Inverting an Axis on a chart

I had a case on my latest project where I had a chart that needed to not start at 0,0 as most do. Rather this chart, and the data it represented needed to have it's Y Axis inverted. The better numbers were closer to the bottom, and higher in value. 0 was bad.

I did some searching and there seemed to be one common approach. manually invert your data. I wasn't sure that was what I wanted, but it turned out that that approach worked really well.

 

in the function that creates the data for the chart, I simply invert the values by subtracting 2* the value, from itself

val.perfRank = (performance - (performance * 2));
val.availRank = (availability - (availability * 2));
val.consistRank = (consistency - (consistency * 2));

 

After populating my dataprovider with the inverted values, all I needed was a label function to undo my voodoo.

private function rankLabelFunction(labelValue:Object, previousLabelValue:Object, axis:IAxis):Number
        {
            var newAxisValue:Number = Number(labelValue);
            newAxisValue = (newAxisValue + (Math.abs(newAxisValue) * 2));   
            return newAxisValue;
        }

You'll want to make sure to do the absolute value, LOL. Otherwise you'll be like me, "Why is the negative number, even bigger? Oh yeah! Duh!" Math, not my strong suit.

There may be more elegant  ways, I sorta hope there are or will be, but this is a pretty straight forward way to simply put your lowest value at the top of your axis, which is what I needed.

Great Degrafa preso at the RMAUG last night!

I was able to make it over to The Hive last night to see Juan "the hard core super star Degrafa Guy" Sanchez present Degrafa at the RMAUG. I just made up that name, but it fits, so he's welcome to it if he likes.

Dave and company have a new home at The Hive, which is a very sweet co-working facility here in Denver.

 

Juan's session was well timed, i had spent a good chunk of the day figuring out how to skin a link button. Turned out livedocs was spot on with it's example (go figure). But after watching Juan skin a button, I was wishing we had Degrafa in the project I'm on. I did think about using it, but figured that was a decision to be discussed before I committed a whole new library of code.

So my solution, worked well enough, but the Degrafa way is killer.

In a Skin file...

<code>

<fills>
        <SolidFill
            color="#936"
            id="myFill"/>
    </fills>

    <geometry>
        <RoundedRectangleComplex
            state="upSkin"
            width="{awidth}"
            height="{aheight}"
            bottomLeftRadius="10"
            bottomRightRadius="20"
            topLeftRadius="15"
            fill="{myFill}" />
        <RoundedRectangleComplex
            state="overSkin"
            width="{awidth}"
            height="{aheight}"
            fill="{myFill}" />
    </geometry>
           
</GraphicBorderSkin>

<code>

 

There's some AS at the top, but that's the jist of stateful skinning of a button. degrafa FTW!

 

Acrobat pro, I hate you and I think we're breaking up

I never need Acrobat pro. I use preview on the Mac for my basic PDF reading, it's lighter, so it's a no-brainer.

 

HOWEVER

today I had to review 20 PDFs, and make notes on them and even put some text in them so that I could send them off for review.

After suffering through so many stupid Adobe Updater times, when it brings my machine to a screaching high temp halt, Acrobat pro is broke.

WHAT?

I click a PDF to open in Acrobat and get this...

I've done nothing to or in acrobat, ever.

It's been updated plenty since I installed CS3, about every three weeks it seems, i have to go make a sandwhich while the stupid updater runs.

And after all that suffering, after giving up productive cycles.... I get this...

Weak sauce!!!!

 

Of course I get it while I'm in San Francisco for the week, so I don't have my install DVDs..

Session Survey update

I'm really enjoying working on this thing, I really hope other conference organizers can take it and 1. make it better, and 2. make use of it for their events. If for no other reason, than to stop using so much paper.

I've been working on it a lot this week, while I figure out what I want to do next. I've incorporated Rich's UpdateManager so that deploying new versions of the session Survey will be WAY easier!

I've also updated the DB to support multiple events, so now in the configuration file you can specify the ID of the event (among other things) so reusing the app is much easier, with much less coding.

Speaking of config files, I've beefed it up a bit. It started out just holding the location of the backend server, and such. Now you can give your app a title, point to a specific DSN name in your backend, and tell the app where to look for updates.

You can also tell when you're online or off now. There's a little icon that changes from green to red depending on network connection. Network status really confused a lot of people who submitted several not realizing they were offline, and the app not providing proper feedback about saving online. It does that now too.

I'm pretty happy with it and am working with Sim to get it hosted, trac'ed, etc so folks can start submitting bugs, enhancements, etc I'm really hopeful that this app can help Greenify conferences, and improve the feedback we can provide to speakers. Using this tool, Tom and I gave our 360|Flex Atlanta speakers feedback in just about a week of the conference ending, w00t!

 

Stay tuned for the official announcement.

What's the best way to Open Source a project

I'm still working on cleaning up the Survey app to release to the Open Source Community. I'm putting in a few more features I think it should have as a minimum set, but I'm curious. What's the best way to release?

SQL scripts? Dummy data?

I'm leaning towards just SQL scripts. The Dummy data I would provide would be Conference days, Time slots, things like that.

This being my first time putting something out into Open Source, I'm curious what the best approach is.

Any help would rock, I'm hoping that I'll be able to upload it to RIAforge next week sometime. Fingers crossed!

SQLite and AIR apps with Cairngorm

Having never done any SQLite stuff prior to the session survey, building it was a definite learning experience.

The hardest part of building with SQLite I think, is working with existing data. Writing data for later retrieval, cake. retrieving "offline" data, that was a bit more labor.

To start, populating the SQLite DB, isn't fun. I bought an off the shelve tool, SQLite Manager, that I like a whole lot. It supports SQLlite 2 and 3.

I'm not sure, but I'm guessing it's the nature of SQLite files, that once you've created the table and started working with it, making changes to structure, ain't possible.

I suppose since it's a flat file of some sort, making structure changes once populated, wouldn't be possible, but still a pisser. LOL.

Make sure when you create your "offline" tables, you know what you want.

For the survey app, we needed users to be able to still pick a track, and still pick a session from that track.

 

Tom and I ended up making our Cairngorm commands dual prupose. Getting on and off line data. Detecting whether the user is connected as a simple matter of implementing a URLMonitor to ping our site.

The command, looks for our global "am I online" var, and if we're not online, executes the SQLite functionality.

 

In order to make the commands as loosely coupled (for lack of a better term) to being on or off-line, we made the SQL result handler, call the command's normal result. From there the result() looks to see what type of result it's getting, since delegate sends a different type of result Object, than the SQL connection does. From there, it's a matter of formatting the data and storing it.

Our execute() looks like

if (model.networkConnection)
            {
                var delegate:SurveyDelegate = new SurveyDelegate(this);
           
                delegate.getTracks();
            } else {
                var connection:SQLConnection = new SQLConnection();
                var dbFileString : String = "360Survey.sqlite";
               
                var dbFile = File.applicationDirectory.resolvePath(dbFileString);
               
                connection.open(dbFile);
                var sqlQuery:String = "SELECT trackID, trackTitle, trackShortName FROM tbl_tracks";
                dbStatement.sqlConnection = connection;
                dbStatement.text = sqlQuery;
   
                dbStatement.addEventListener(SQLEvent.RESULT, onRetrieveDataResult);
                dbStatement.addEventListener(SQLErrorEvent.ERROR, onDBError);
   
                dbStatement.execute();
               
               
            }

Then the result() does the "what did I just get" logic.

public function result(data:Object):void
{
    trace('[GetTracksCommand] - Result');
    var resultData:ArrayCollection = new ArrayCollection();
    var tmpAC:ArrayCollection = new ArrayCollection();
        
    if (data.hasOwnProperty("result")) {
        resultData = data.result;
        } else {
            resultData = new ArrayCollection(data.data);
        }

I was a bit worried that it would be harder to build a connection aware application, especially since Tom and I didn't really start writing code, until about 2 weeks out from Atlanta. There's still a few things to re-factor in the code, and get cleaned up, but I think when we put this app out into the Open Source domain, other conferences will be able to easily modify it to their needs, they'll need a CF backend, unless they want to replace the CFCs with .NET, PHP or Java whatever, but hey, it'll be a starting place.

 

 

 

 

360|Flex Session Survey App

I'm looking for some ideas on what everyone would like to see in the Session Survey. Give me your ideas...

So I'm spending some of my down hours while I work on my next gig working on the session Survey App.

Our launch during the conference went ok, a few bugs, nothing too bad. Now it's time to clean up and enhance. I'm thinking we'll try to get it to a nice 1.0 place, and then put it up on RIAforge. I wanted to put a few more security measures, and user experience enhancements.

I also wanted to get anyone's input on what they'd like before it goes, Open Source.

I'm working on validating Attendee ID, so we can minimize crap data. Then I'll work on setting your ID into a shared Obj for persistence, maybe just us SQL Lite? I dunno.

I'm also going to improve the user feedback, when the app is working in "offline mode" maybe a cool status light or something? Also will make sure the save complete dialog shows up in both modes, not just 'online'

Besides those three things, what would ya'll want in a survey app for conferences?

If you're an attendee, let me know what you think of the app, no holds barred. I know it's rough, shoot! Tom and I worked on it off and on just the last week or two leading up to the Conference. You know the saying about the mechanic having the crappiest car.

I'm excited to get it buttoned up enough to put up on RIAforge, it'll be my first OS project... yippy! I'm really hoping others will jump in to help improve conferences of any type.  Part of the release will include the DB design, you'll need to create your own SQL lite DB for offline mode, with your own data, sorry, can't give out our attendee info.

SmallWorlds Second life, but in Flex, and smaller

THE Ryan Stewart hooked me up with an invite to SmallWorlds, It's pretty cool, I'm not sure how much I'll use it, but I had fun setting up my pad, while I watched TV tonight.

It's a pretty dope little app, and certainly a bitchin' Flex app! I'm thoroughly impressed, good work guys!

I'll make sure to book mark it and check in from time to time, I'm interested to find out what the model is behind it, what's the point? What's the monetary strategy? I'm guessing it'll be like SecondLife and in order to get spending money you'll have to put money in, or make it somehow?

Wonder if they'll make an AIR version? A direct SecondLife competitor?

January Denver Flex user group Meeting Reminder

January 8th will be the next meeting of the Denver RIA Developer Group (DFUG)

The location is still being worked out. Denver is a bit tricky to set up FUG meetings. go figure.

Jeff Barr, an Amazon Web Services Sr. Evangelist will give a talk on AWS including EC2 and S3.

Agenda: 5:30 – 5:59 Networking and Dinner 6:00 – 7:29 Main Topic and Discussion 7:30 – 8:00 Open Discussions

This meeting is sponsored by: TBD

This will include: MTurk: Mechanical Turk SQS: Simple Queue Service S3: Simple Storage Service EC2: Elastic Compute Cloud

(a) some thoughts on where Amazon sees computing headed
(b) a drive-by tour of their service lineup
(c) some sort of demo: perhaps setting up EC2, customizing an AMI, or sometimes code

 

RSVP and sign up here.

Any thoughts on places to meet? Drop a comment and let me know.

Been a busy few weeks.

  I'm sitting in SJC waiting for my flight back to Denver, thought I should catch up on blog writing and reading. I've been onsite at newly un-stealthed Ribbit, working with them on some really cool stuff. As I've said, it's a great project, great team, etc. I'm having a good time working on this project. Esria is a great group of guys to consult for (even if they are from canadia :P ), I'm really glad they were able to get me in on this project.

I had twitter track 'ribbit', and watching the posts fly around yesterday was cool. So much excitement, so many people talking about ideas, implementations, speculations, etc. It was very neat to watch.

 It's kind of cool to be with them as they come out of stealth, never experienced that before. News crews coming by, people coming in off the street to talk about business opportunities, etc. it's very exciting, I'm thrilled for Chuckstar and the team. If you haven't done so, go sign up for the beta, the possibilities for Ribbit are endless. Screw that old, click to call (which launches Skype), or tools, that aren't developer friendly. I can see blogs with voicemail, 'Click to call' that does just that, no external tools or apps needed, you click, an your browser starts to ring, how freakin' cool! Go sign up!

 

In working with Ribbit, I'm getting a chance to really stretch and grow my abilities, something I've been craving since like... forever. I'm getting to get my hands dirty in the API that'll be released soon, building services and tools around it. it's very exciting!

Work on 360|Flex of course hasn't stopped, it never does. Tom and I announced our plans for giving something back to the community, a plan I'm very excited about, since giving what we can back in as many ways as we can, is a core tenet of 360Conferences. We're also looking into another really cool thing to announce, hoping we can announce it soon, I think it'll be a lot of fun. You'll just have to wait and see, it'll be cool though, it always is :)

Leaving San Jose just in time for snow.

I've been in San Jose this week at Ribbit, and am currently sitting in SJC, waiting for a delayed flight to DIA, just in time for some serious snowing that's going on in the Denver area today and tomorrow. Yippy! It'd be nice if it meant I got to go skiing, however it does not, so it isn't.

Nicole had a minor accident on her way to an airport in Wisconsin so I'm heading home (she made her flight!) to see her for the weekend. Then back to San Jose for another week.

I'm really enjoying Ribbit. It's only been a week, but the project is very cool, the people are great. Knowing two of them going in doesn't hurt either, Hey Chuckstar, hey Pete! Ribbit has some cool stuff cooking, including a cool "coming out party" Not in that way! If you haven't signed up, you should, it's cool stuff, I'm very excited to be a part of it, and look forward to the challenges ahead.

Oh yeah, if you're not coming to the party this coming Thursday, you should feel bad for yourself, I think it's gonna rock, and am STOKED that I'll be in town for it. Ain't no party like a SilVaFUG/Ribbit party cuz a SilVaFUG/Ribbit party don't stop!

 

More Entries

BlogCFC was created by Raymond Camden. This blog is running version 5.5.1.