Testing code is one thing, but how do we test our ideas. (I’m not talking about validating ideas with customers as in Lean Startup, but testing an idea against your gut. Is there a way to measure that?)

When you’re small, opportunity costs are huge–your best customer is another customer you didn’t meet–so how do you know at a real gut level if you’re making a decision for the right reasons or if you’re reacting to fear? How you do test if you’re aligned with your idea?

runtestlg2The Running Test is one way to get information about decisions, and I’ve found its results surprising. When I’m mulling something over, I’ll find it has one of two impacts on my run. I’m not a brand new runner, but it’s not second nature either; each run has a good amount of talking to myself about slowing down or walking this part of the trail. But sometimes I move through those parts of the trail much more easily–if the idea I’m mulling over is a good one, I find it gives the run energy. I see the idea expanding and suggesting new ones. My run times are actually faster: sometimes a lot faster.

The opposite experience is pretty hard to miss also: there is more negative self-talk than usual on the run and I find myself rehearsing negative outcomes or confrontations. Run times are slower and I am walking up those hills. 

The first time this surprised me I was preparing my talk for DevCon and figured I should chastise myself just a little for agreeing to speak at the conference at all: it wasn’t strictly on mission and would take a lot of time I should be devoting to getting our new calendar wrapped up. Instead I found myself sketching segments of the talk on my run and really enjoying how the talk came together. I was running a bit faster than normal and not worrying about the hills or tough sections of the trail: there was no background worry for that trail-worry to attach itself to.

I was going to enjoy working on this talk and that was somehow not clear to me before the Running Test. It was also on mission as I now saw the talk connected to all the things we were doing in our new calendar. Maybe the run wasn’t so much a test as a creativity-lab, a place to spin up better versions of the idea. But while new ideas certainly come on runs,  the Running Test feels more like a gut check.

Good ideas let me run faster. Strangely, it’s sometimes that simple.


JavaScript Functions for Speed and Profit

The movie below is from one of our most popular demos from “Year in Review” at DevCon 2014. I was talking about what a breakthrough custom functions were back in 2004 and how they unlocked a whole new kind of code-sharing among FileMaker developers. JavaScript functions in FileMaker may unlock even more potential.

Jason Young introduced the idea of using JavaScript as a calculator–as a library of functions–instead of using it for perhaps the more obvious purpose of building interface elements. (Jason’s original article on this can be seen as part 1 of this post.) This gives us a huge opportunity to share and borrow code from the immense catalogue of JavaScript functions and examples.

FileMaker Custom Functions Forum

FileMaker engineers start posting custom functions to a public forum: March 2004

As just one example, we (Jason) rewrote the venerable “namwoB” function in JavaScript. namwoB was the first recursive functions I ever saw and was posted by Andy LeCates back in March of 2004. The title comes from Court Bowman’s name spelled backwards… which is all the functions does, rewriting a string of text in reverse. This simplicity makes it a great way to talk about the different kinds of recursion in FileMaker and what a faster version of the function might look like in JavaScript.

Our example file shows the same recursive custom functions done as a “stack” recursive function (limited to about 10k loops), as a “tail” recursive function (limited to 49,999 loops), and as a JavaScript function executed in a webviewer and then passed into a FileMaker script.

Download the example file

JavaScript Functions in FileMaker are Fast

Looping through 49,000 characters took our tail-recursive custom function almost 3 seconds.

The JavaScript version of the function looped through 10 times that much text–nearly 500,000 characters–in 3/10ths of a second.

And thanks to the improved fmp url in FileMaker 13, we can grab the results of functions like these quite easily. The movie below demos this and walks through our example file. It also gives a nice side-effect-demo of how webviewers get their own thread in FileMaker Pro and what that may mean for trying to measure performance.

Want more? Subscribe to SeedCode for more tips.

With so much going on at DevCon–and so many friends to catch up with–it can be tempting to put yourself on auto-pilot for the whole conference, just reacting to what’s around you.

You can feel a little aimless that way. And you can miss things. You’ve sacrificed a lot to be here so double-down on that commitment: join the DevCon Meditation Challenge and see what it does for you.

Folks who take up the challenge will take time to meditate on their own, for two eight minute sessions each day. You can do this whenever you want but we’d suggest before breakfast and after the day’s last session.Sitting down (anywhere) and simply watching your breath is great. You might also lightly think about an open question like “How can I share what I’ve learned?”

I think you’ll find yourself refreshed and refocused: ready to dive into example files, blog some stuff, or hit the bar. Get the most you can out of this DevCon: tweet “I’m In #FileMakerDevCon #MeditationChallenge” to join us and encourage others.

I’m in – Take up the Challenge

Take this practice home after DevCon and you may be surprised what you can accomplish.ganeshblue

If you haven’t played with flights on Virgin America’s new site you should definitely check it out. A great rethink of the flight booking workflow, it’s also a nice argument for the long-scrolling site.

Big, sexy date pickers are dear to my heart. Book a flight. Details on the redesign, Work & CO, and their use of AngularJS here.

Syncing FileMaker Go

We got some great questions about sync in our last webinar and we’ve posted a video below. Big thanks to Todd Geist for joining me to answer questions and talk sync…

If you’d like to attend and ask your own questions we have two more sync webinars scheduled:

August 5, 10am PST – https://attendee.gotowebinar.com/reg…38086638329090

Aug 13, 3pm PST – https://attendee.gotowebinar.com/reg…29797594544130

Both webinars will have the same format as the original with Todd Geist and I taking questions on sync in general, FileMaker 13, and what’s new in GoZync 5.

Learn more about Syncing FileMaker Go with GoZync
GoZync download, demo & screenshots.

Read Full Article →

This video and example file demonstrates how to sync just the records relevant to your current location. This is a very common workflow in offline solutions and it helps keep the found set on your mobile device nice and small: meaning faster syncs and a better experience for folks in the field who don’t have to page through a bunch of irrelevant records.

Filtering using Find Requests

PageLines- ZyncFaster.pngTodd Geist put together this sweet example file and video to show off the filtering in GoZync 5. “Filtering” lets developers constrain the records that GoZync will consider for syncing. All you have to do is write a Perform Find () script step and GoZync will look within the resulting found set for records that have changed since the last sync. This is one of our favorite things about GoZync, and key to making it so flexible and easy to customize.

Using your Current Location (and current user)

This technique uses the Google Geocoding API to determine what zip code you’re in. Once you know the zip code you’re standing in, you can filter work orders (in this example) to bring down just your scheduled orders in the current zip code. The scripts for doing all this are included in the example file.

Needless to say, this would be a great mod for GoMaps users to add to their files.

Video and Example File

Todd’s article explains how GoZync uses filters and how it takes advantage of Perform Script on Server (in FileMaker 13). Definitely required reading if you’re building offline solutions in FileMaker Pro or Go.

Check out Todd’s original article where you’ll find more details and a link to download the example files.

You can learn more about GoZync here, and go in-depth on filtering in GoZync docs: Filtering– Downloading Found Sets.

Enjoy!

 

Todd and I spent a week in Seattle together finishing up the latest version of GoZync: version 5. (GoZync is our scriptable sync framework for FileMaker: free and pro versions are available.) It’s hard to believe GoZync is now 3 years old, the first version having been released in June 2011. We’ve synced a lot of files since then. =)

Faster FileMaker Sync

Faster FileMaker Sync - the GoZync Logo

You’ll see substantial speed improvements when pulling records down to your mobile device thanks to the new Perform Script on Server (PSOS) script step. This radically reduces the time it takes to determine which records have changed, and makes the biggest difference in cases where there are a large number of potential records but only some of them have changed since the last sync.

(PSOS requires FileMaker Server 13, though GoZync will sync without PSOS on FileMaker Pro and on earlier versions of FileMaker Server.)

 

Here’s an example with 100,000 records; 5,500 on this iPad; 100 records changed on the server and pulled down to iPad; 50 fields.
3:20 min (GoZync 4)
32 seconds to pull (GoZync 5)

Easier to Mod & Better Example Files

Modding: it’s what we FileMaker developers do

GoZync 5 continues our theme of making the sync easy to get inside of and to modify. With this version we’re including a set of demo files (hosted and mobile files) that demonstrate two of the most frequently scripted mods our customers make in their syncs: checkout and filtering.

Checkout: GoZync lets you edit both sides of a transaction during the sync, so you can mark a hosted record as checked out inside the same transaction used to pull the record to your iPad. Marking a record as “checked out” not only confirms that your mobile user grabbed it, but lets you lock the record back at the office if you want to.

This same scripting can be used to edit related records when orders are “checked back in”–things like updating a customer’s outstanding balance or scheduling follow up actions can be done inside the sync as well: and that can make the difference between your mobile users having the latest information versus having just recent information. This is a big difference between transactional syncs like GoZync and eventually consistent syncs like MirrorSync.

Filtering:  The key to a great mobile experience is making sure users have the records they need to work with right in front of them. They shouldn’t have to wade through old or irrelevant records to get their work done: and they shouldn’t have to wait through syncing records they’ll never look at. Filtering in GoZync lets you use simple scripted finds  to control which records a user pulls down to their iPad. “My active orders” or “my patient visits for today” are common filter setups but you can make these as specific as you’d like: in GoZync you script a find request–any find request–and GoZync looks within those results for records that have changed since the last sync.

GoZync also manages the records on your iPad: records no longer matching your filters–orders that are now closed or assigned to someone else–are removed from the iPad after they’re synced. To get a sense for how cool this is for your mobile users, watch this 1 min video demonstration how our example file manages “my work orders” on an iPad.

Note that in GoZync 5 the scripts for filtering are now in your hosted file: this means you can tweak the found sets sent to your iPads without distributing new mobile files. That’s cool.

Why a new version of GoZync

We originally built GoZync because we knew folks would want their FileMaker Go solutions to work offline, and that FileMaker’s import script step just isn’t reliable when it came to syncing related records.

Three years on and we still think GoZync is the best sync framework out there, and the only one we’d trust in our custom work. This new version is the product of years of sync experience and support: helping hundreds of customers craft a sync specific to their needs.

Read Full Article →

A colleague was asking how to simulate a drawer effect in FileMaker where an animated slide panel appears to withdraw completely into the window edge. This is pretty easily done but there are a few tricks to keep in mind (below).

Animated Slide Panels

Download the demo file, based on the Invoices starter solution. Click “slide panel demo” in the header to show and hide the panel.

Here are some tips to get this working smoothly:

  • The slide control consists of two panels: panel number 1 is blank, panel number 2 has the content you wish to reveal.
  • The color and stroke of both panels is set to none: it’s the object (rectangle) within panel number two that gets a fill color and a stroke.
  • The big downside here is that panels aren’t “blockers” so buttons etc behind the tab panel still work:  you can see this in the demo by clicking where the blur “new invoice” button was when the panel’s showing.
  • I didn’t address this in the “Slide Panel Demo” button, but the trick is to use Hide Object When to hide these objects as you reveal the tab panel: hide them explicitly by setting a $$Var and then refresh the objects after the panel is drawn for the best effect.
  • Some of that “after the panel is drawn” timing is best executed with OnTimerScripts =)  Click “Slide Panel Clean” to see this method of disabling “new invoice”.
  • You can’t really hide things that extend both under and outside the tab panel, like the portal rows on that invoice layout. The only solution there is to break that full-row button into two, one of which is the width outside the slide panel, and one of which is full-row-width. Put the full-row button on top and hide it like we do “new invoice” when the tab panel is drawn: I didn’t go to those lengths in this demo.

As you can see, animated panels can take some fiddling but you’ll be able to get some nice behaviors.


Perform Script On Server (PSOS): Overview

The “Perform Script on Server” script step was introduced in FileMaker Server 13 to let clients of a hosted file run scripts on the server. So with some careful planning, you can have the server do a lot of the heavy lifting the client machine would normally have to do (finding, sorting, processing, other data manipulation, etc.). This means you can sometimes avoid moving large amounts of data over the network, which is what normally happens when the client machine runs a Perform Find or an SQL query on a hosted file.

Using PSOS can result in dramatic performance improvements in these types of operations when opening your file from outside your local network. Our tests with the Pro Calendar showed refresh times 10-40 times faster when using PSOS from outside the network (your mileage may vary).

You’ll likely not see any improvement when you’re ON the local network.

PSOS in SeedCode Calendar Pro

Perform Script on Server in SeedCode CalendarThe new upgrade for SeedCode Calendar adds a switch for using PSOS on the calendar’s settings tab. Developers can turn this on for just their session while they’re testing or they can make it the default by editing the comment for PSOS in the calendar’s “Load Settings” script.

Why wouldn’t everyone want PSOS on?

The speed improvements in PSOS are most dramatic when you’re far away from your FileMaker Server. But it does come with a trade off: scripts run under PSOS don’t cache their results the way scripts running locally would. So if your server is close enough, you may not want PSOS running because you’d rather have the caching.

Here is an exaggerated example:

  • Without PSOS, opening your calendar from another state takes 9 minutes to move from month to month. But once you’ve been to a given month, going back to that month takes only a couple seconds.
  • With PSOS on, it only takes 5 seconds to go from month to month… but it always takes 5 seconds. Going back to a previously visited month is no faster than going to a new month.

Going Further

If you want to learn more about PSOS I highly recommend this article by Vince Menanno: 100x Faster – Flight Testing FileMaker 13. Very well done. Vince rightly points out that there are a lot of things to manage with Perform Script on Server because the server doesn’t have the same state (globals, found sets, the current record, etc.) as the client. We’ve scripted all that for you in the calendar’s PSOS queries.

We hope you find it useful.

Read Full Article →