Posted by: Younicycle, the Platform as a Service (PaaS) | 02/01/2011

PostgreSQL and Recurve Archery. How can you miss?

As I sit here, watching my Xerox printer run 14,000 personalized, Increase 401(k) Enrollment documents,  I realized I hadn’t posted to this blog in a way-long-time.   Rather than write about the money making project at hand, I decided that Archery (at the moment) is more interesting.

My Spousal Unit is a Recurve Archer, which is Olympic style.  You’ll never see her in the Olympics, but she’s pretty good for our backyard (New York) and has won a tournament or two in the last 7 or 8 years.  My role is to drive her to the tournaments, haul her equipment around, set up her scope and sit on my tail in a lawn chair for one or two days.

If you’ve never watched an Archery tournament then it’s akin to watching your lawn for 7 or 8, unabated hours.  The first day is much fun, but day two can be draining.

Archers practice for hours on end.  Most of the time – in competition – they shoot 144 arrows, in batches (Ends is their terminology) of 3 or 6 at a time.  Usually, there are two people shooting at a target and when their time is up (one hour in dog years), another crew of two step up (the 2nd Line).  When it becomes obvious everyone is done, they walk to the target, write down their score for each arrow, draw little lines in the target, then walk back.  Whistles blow at different times to keep them from killing each other.  Sometimes people miss the target, then the chubby guy with the whistle walks around with a metal detector.  Eventually, they come back and start again.

Bored yet?  Good.  I need company.

Anyway, I decided to make a way for Archer’s to record their practice scores via the web – knowing that no archer would ever use it.

Here’s how I did it:

1)  I used our Online CMS & Knowledge Management System (the Template tool), to draw a set of concentric circles of the correct color.  Positioned each of them correctly – and rasterized the vectors into an image.

2)  Next, I made a web page, a couple of Tables (for storing the data) and a bit of Javascript that records the position of a mouseclick and submits it to the Table that holds the x,y position of each arrow.

3)  Step 3 (give or take), was to write a couple of queries that would calculate the score (based on the mouseclick position), sum all the scores – and also allow for clearing all the arrows off the target – and store in a history Table.

4) Finally, I made a dot chart – which plots every arrow dynamically – and returns the dot to the page.

was a vector, now an image

The query:

SELECT “xyarchery”.”archer” as “archer”, “xyarchery”.”session” as “xyarchery_session”, “xyarchery”.”arrow_number” as “arrow”, IF(mod(“xyarchery”.”arrow_number”, 6) = 0, 0, 1) + IF(“xyarchery”.”arrow_number” = 1, 0, “xyarchery”.”arrow_number”) / 6 :: integer as “end”, “xyarchery”.”xx” as “x”, “xyarchery”.”yy” as “y_display”, 400 – “xyarchery”.”yy” as “y”, round(GREATEST(10.5 – sqrt(((“xyarchery”.”xx” – 200) ^ 2) + ((“xyarchery”.”yy” – 200) ^ 2)) / 20, 0)) as “score”, ‘    ——>’ as “spacer”, IF(“xyarchery”.”lock” = ‘true’, ‘Practice arrow’, IF(CASE   WHEN “xyarchery”.”xx” < 190 THEN ‘left’  WHEN “xyarchery”.”xx” > 210 THEN ‘right’  ELSE ”  END || ‘ ‘ || CASE   WHEN “xyarchery”.”yy” < 190 THEN ‘hi’  WHEN “xyarchery”.”yy” > 210 THEN ‘lo’  ELSE ”  END = ‘ ‘, ‘Nice! 10x’, ‘Was ‘ || CASE   WHEN “xyarchery”.”xx” < 190 THEN ‘left’  WHEN “xyarchery”.”xx” > 210 THEN ‘right’  ELSE ”  END || ‘ ‘ || CASE   WHEN “xyarchery”.”yy” < 190 THEN ‘hi’  WHEN “xyarchery”.”yy” > 210 THEN ‘lo’  ELSE ”  END)) as “adjust?”
FROM
“younicycle_com”.”xyarchery” AS “xyarchery”
WHERE “xyarchery”.”arrow_number” > 1
ORDER BY “arrow” desc
LIMIT ALL
OFFSET 0

If anyone has an overwhelming interest in testing it, the page is here: Archery Scoring

Printer just jammed.  Back to work.  btw for any archers -> my wife shoots around 1,200…. 1,220.  Hoping for a 1,250 this year.

Posted by: Younicycle, the Platform as a Service (PaaS) | 10/08/2009

SaaS and QR Code

I’ve been a bit buried of late working on swfs, creating user forms, adding content and redoing the Employee Communications website but I thought it is time I added a post about a new SaaS Tool we are adding to Younicycle.

Much of my ‘old – line’ business includes the entire process of Benefit Statements (Total Compensation Statements), to include data manipulation, design, print and fulfillment.  Personalized, financial documents have more impact – but there is only so much information that you can squeeze onto one piece of paper, which leads to the topic at hand – SaaS and QR Code.  If you aren’t familiar with QR Code ( a type of 2D barcode), it is definitely worth a look.  Pretty interesting concept – an example:

SaaS QR Code

SaaS QR Code

1) Create a document

2) Create a QR Code with entered data (example: ‘http://postgresql.org’)

3) Place the QR Code on your doc – and print it.

4) Assuming you have a smart phone (may require a small software install) – point your smart phone at the printed QR Code – and you will be prompted to ‘Go online’.  If yes, you would be directed immediately to the web page for PostgreSQL (example).

Of course – the actual website page could also have a user form, where user info could be submitted.  We already have all the other necessary SaaS Tools (database builder, query editor, report & pdf generator, CRON, etc), so it will be a snap to schedule the creation of a Report within an SaaS Account, which would in turn be emailed to us at a certain time each day.

Short version?  Printed documents need not be ‘dead-end’, but can become living and allow for dynamic interaction.

So – I decided this is just too interesting to delay until 2010, so we are testing an implementation now on our testbox and should apply to our Production servers by the end of next week.  We still have a few items that need to be added:

1) Allow creation not only of gif, jpg or png – but also eps – which can be scaled.  This will allow creation of QR Code signage (say for a url of a restaurant menu – or a list of upcoming events) – really large output.

2) Add capability for QR Code color – and background color.

3) Add capability to use a datasource or a Table with values that will store the various settings and initial data input.  This is where the Benefit Statements come back in play as  we will be able to make personalized QR Code.

Below is the current GUI we used for testing.  It will change significantly, as outlined above.

qr_gui

Posted by: Younicycle, the Platform as a Service (PaaS) | 09/18/2009

No new taxes – or – more Old taxes?

While gleaning through various articles on the Baucus vsn of  the Senate Finance HealthCare proposal, I noticed  one item that was mentioned as an afterthought:

“As of next year, employers would have to disclose the estimated value of an employee’s health insurance benefits on workers’ W-2 forms.”

We’ll need to assume that Forbes actually read the ‘slimmed down’ 223 page summary.

Let’s do a bit of simple math on that nugget.

According to the National Coalition on Health Care, the employees share is $3,354.40 per year.

I never allow lack of precise info to stand in the way of a thought, so let’s make a basic assumption; that the average across-the-board, combined Federal & State tax rates for the same group is 21%.  So far:

3,354 x .21 = $704 (give or take)

ahhhhh, but there is more.  This additional ‘income’ will also be taxes for FICA and Medicare.

3,354 x .0765 = $257 (give or take)

$704 + $257 = $961 in additional Taxes – per average, covered employee, per year.

Still not done.  The Employer must match this incremental amount.  Total damage?

$704 + $257 + $257 = $1,218.

So when we proudly hear our respected, elected Representatives proclaim “…. and there are no new taxes!”, they are certainly NOT lying.  No new taxes, just more Old Taxes.

A good deal of our work is related to Employee Communications.  If ‘whatever’ HealthCare bill gets passed AND it includes the above provision, then Employers should provide personalized communications to their employees. Personalized Knowledge Management.

More later.  I may need to design a quick ‘product’.

Posted by: Younicycle, the Platform as a Service (PaaS) | 08/26/2009

SaaS and Online Charts

One of the tools built into Younicycle is the ability to create data driven charts online.  Note that the chart below was NOT created by Younicycle – though it would have been simple todo.  The original article is here and bears a read.  In fact, this post (SaaS and Online Charts) is less about Younicycle and more about a different kind of Great Divide that is more insidious than the lack of knowledge.  Look at the chart, read the article.  Outrageous.

click image to see full size
Posted by: Younicycle, the Platform as a Service (PaaS) | 08/26/2009

SaaS and PostgreSQL 8.4

I just spotted this tidbit from the PostgreSQL news feed, which we display on Younicycle as an example of easily picking up a newsfeed.

The portion of David’s post that is of interest for us is towards the bottom of his explanation – specifically where he describes the routine for identifying ‘orphaned tables’ through use of PostgreSQL 8.4′s new Windowing function.

This may help us isolate a couple of minor fixes necessary for the Vertical SaaS installer.  Unfortunately, we are still on PG 8.37 (which lacks the Windowing function).  We may need to rethink our implementation schedule for 8.4.

Posted by: Younicycle, the Platform as a Service (PaaS) | 08/25/2009

PostgreSQL and SaaS (for dummies)

I’ll get back to my earlier posts about Vertical + Horizontal a bit later as there are still a few stray strands of SaaS spaghetti that need to be tied together. In the meantime, I thought a short post about SaaS and PostgreSQL could be helpful.

I suspect that there are fewer than 10,000 people in the world that have read the entire PostgreSQL manual from cover to cover – and that may be a generous estimate. One of the goals of the project is to bring true database functionality to an SaaS – and more importantly – to make it understandable for folks such as myself. I personally believe the reason that Filemaker has such broad penetration of the desktop market is because of its GUI, much of which is WYSIWYG. Now if we could ‘boil down’ PostgreSQL to the point that normal folks could use it and use it together, then we’d have something of worth. This first screen shot is the initial load of an existing query.

 
 Joins, expressions, where clauses, order by, the actual sql and testing the query are done by navigating with the tabs. This ‘visual’ element can be mighty helpful for people that can look and understand as opposed to read and understand.

The next one shows a different tab for the same query which shows the sql editor.  Part of the trick to making the product acceptable (my opinion) is that it needs to also be acceptable for the guys that sit on the right hand side of the great divide.  So – I can use the GUI  – but a Pro can just type SQL – and get the same result.  Over time, a Novice can learn.  Until that time, a Pro can help.

 
Regardless of the method used, the result is the same.  I cannot say with certainty, but I believe that Younicycle is the most advanced SaaS with true (and understandable) database functionality. Results below:

My personal strength is Employee Communications, so being able to rapidly develop coherent data and incorporate into either print or web enables me to effectively present personalized communications, which is significantly more effective at delivering a message.

Posted by: Younicycle, the Platform as a Service (PaaS) | 08/21/2009

Wysiwyg SaaS and XHTML 1.0 Strict

It occurred to me this AM that I had not included any documentation or even mention on the site that the Younicycle Website Builder automatically generates code that is XHTML 1.0 Strict. This is not a trivial accomplishment for a WYSIWYG Tool, particularly one that provides a wide breadth of functionality.

If you don’t know about the W3C Validator, you can check any web page for XHTML 1.0 Strict right here. The error report it provides for a ‘bad’ page is very helpful in debugging.

Posted by: Younicycle, the Platform as a Service (PaaS) | 08/20/2009

Vertical SaaS Solution (update 1)

A followup on the 1st post of this thread:

  • The issue with duplicate names for index pages and violation of foreign key constraints for datasources was resolved.
  • The next step is manipulating the sequence of the script. To continue the analogy of spaghetti, each strand needs to be inserted in a specific sequence that allows all keys to function properly and ‘recognize’ the other strands.

    A specific example would be Templates and Reports. A Template (in the Younicycle system) is a WYSYIWYG design tool not totally dissimilar to a Filemaker Layout – or an Adobe Illustrator file. You draw, type, place images, assign to a datasource (for data), place datafields and so on while assigning properties to each ‘object’ by using a simple toolset. The end goal is to produce a Report – be it a traditional Pdf brochure (SaaS Brochure) – or – a columnar data report.

    OK, finally I’ll make my point – if we insert the Report before the Template, then we have a problem since the Report depends upon the Template. Sequencing is underway and this sequence can itself be a complex expression (calculation).

    ……… more later..

  • Older Posts »

    Categories

    Follow

    Get every new post delivered to your Inbox.