Tag Archives: Programming

Release : Python Baseline for _framework

[MIDI Remote Script] Python baseline [Control Surface] extends the _framework instance of the experimental, undocumented, and officially unsupported API for Ableton. This particular script is very simple in the functions currently provided, but this is pivotal in establishing a clean, usable, and well thought out pattern for building MIDI control surfaces.

Posted in Release | Tagged , , , , , , , | Leave a comment

Get Tracking Information from Magento via Order Number

I work in Magento frequently. Here’s a pretty straight forward query to get the core shipping information out of  in Magento for  v 1.4.1 (will not work pre 1.4x as all the tables changed – no really, thanks)

select  shp.number, shp.title, shp.carrier_code, shp.updated_at, flt.shipping_description
 from `magento_store`.`sales_flat_order` as flt
 left join `magento_store`.`sales_flat_shipment_track` as shp
 on (flt.entity_id = shp.order_id)
 where flt.increment_id = '$order_id';

I use a WordPress install to interface with the Magento DB to stress server less.

Don’t forget that the 1.4x shipping API for Magento is B-U-S-T-E-D as of this writing. Here is the link I found:

http://magebase.com/magento-tutorials/shipment-api-in-magento-1-4-1-broken/

If you are considering working with Magento you must understand that the community version is out there to crowd source debugging. Living on the Magento forums for a long while now I see a specific pattern of disengagement from the Magento development team in addressing major issues. I am sure they would speak to the contrary.

Posted in Magento commerce, Programming, Web | Tagged , , , | 1 Comment

CSS Compression with nothing more than your brain

Right now I am compressing some CSS into a slimmer package. This is only one of a few steps, but this little bit of planning and thought will save a lot of time in the end.  Especially when your CSS file is 2000+ lines and already formatted in line to decrease line count.

The original:

#iz_catnav {
    background: url(/add/images/left_nav_rpt.png) repeat;
    width:185px;
    padding:4px 0px 4px 0px;
    overflow:hidden;
}
#catNavCap {
    height:30px;
    width:185px;
    background: url(/add/images/left_nav_cap.png) no-repeat;
    margin:0px;
    padding:0px;
}
#catNavBase {
    height:30px;
    width:185px;
    background: url(/add/images/left_nav_base.png) no-repeat;
}

compacted:

#iz_catnav, #catNavCap, #catNavBase  {
    background: url(/add/images/left_nav_rpt.png) repeat;
    width:185px;
    padding:4px 0px;
}
#catNavCap, #catNavBase {
    height:30px;
    margin:0px;
    padding:0px;
}
#catNavCap, #catNavBase {
    background: url(/add/images/left_nav_cap.png) no-repeat;
}
#catNavBase {
    background: url(/add/images/left_nav_base.png) no-repeat;
}

So, minor gain, a 2 line reduction. From 18 lines to 16 lines. Just over 10% reduction.  Think about that on the scale of thousands of lines of CSS. Then compound that with “smart” design and setting up better patterns in your CSS including Object-Orientated CSS where standard attributes are wrapped up in a well defined document.

How many times are you Floating?  What if there was compressed style sheet with all your common needs defined in classes.  Nice huh? That is the idea behind OO-CSS – more reusable objects (classes).

Posted in Programming, Web, Wordpress | Tagged , , , , | Leave a comment

Programmer begins to go crazy when coffee is too weak

Working on some application and I wrote this comment:

include $_SERVER['DOCUMENT_ROOT'].'/######.#####.php';
/* this file includes switching and error handles/ This has to be on the
root (or you will need to hire a song and dance man with a one trick
pony, a knife, 2 avocados, an icepick, and a pastry blender)

Comments are the programmers legacy.  Some people consider the program to be the legacy (Caprica even referenced this idea).  The comments are the communication to the piers.  The piers need to know where you stand.  Sometimes this standing is honesty in stating

/* I know this is a bad way to do things, but the pay was not
enough to do this correct. When the database catches on
fire tell the boss they should have found another $500 */

More to come, coffee on the way.

Posted in Programming, Web | Tagged , , | Leave a comment

How to make money selling phone apps 101

The way to make a fair dollar with many apps is simple. You will need scrolling.

This same method is the dividing point between what should be a killer ap on the Droid and what you would expect on the iPhone. The exact app is not important.

Droid: App is free and works great but scrolling is a dog.

iPhone: App is $3.99 and scrolls nice.

Is scrolling worth the $3.99 or $0.99 or however the dev sets it?

Probably.

Yeah, most of the time.

Also, it is no longer an iPhone, Android, Blackberry, or whatever thing. I say this with the anticipation of Adobe Flash in CS5 firing out files for iPhone,  and I imagine more to come. Bonus – ECMA 5 was recently finalized.

So imagine one common language, guided by a larger common model, allowing multiple platforms to receive from a single codex.

Hmm, the circuit you run on is much getting less important.

Oh yeah, remember there is JQuery Touch (demo). So the walls are closing in on some ideas, but generally opening up for the masses.

So, that money thing. Free gets the crap scroll.

Paid gets the smooth glide.

Posted in Apple, Programming | Tagged , , , , | Leave a comment

Handy php function to check file extension

I am wrapping up the Ableton Denver site and I found myself checking the file extension rather often. Like most programmers, if you do something more than one time you write a function. I wish I could write a function for grocery shopping, any who, here is a tidy snippet for anyone who might need this type of thing:
Continue reading

Posted in Programming | Tagged , , , , , | Leave a comment

SWFobject Helper

This project is no longer supported.

Posted in Programming | Tagged , , , | 1 Comment

So nice to not hear about Twitter

Attended “Refresh Denver” for May 20 with a presentation on Gestalt theory in UI design / iplementation.  The presentation was good and Twitter free.

Some other work I have been doing has WAY to much to do with Social Networking, and Twitter in specific seems to be read or heard 2x/hour (even in my sleep). SO an intelligent presentation on human behavior and UI design is SO welcome.

Here are some references:

Refresh Denver

Presenters Site

Posted in Web | Tagged , , | Leave a comment