Project

General

Profile

News

Askia Development: AskiaScript 2.0: why you’ll love it!

Added by Jeremy Hollow almost 5 years ago

For people who write software for a living, there’s a persistent challenge. What’s the best way of making things simple and intuitive to use, while at the same time providing flexibility and power? We have always tried to make a lot of things possible through the graphic interface, but a GUI has its limits. Even in version 1 of askiadesign we saw the need to offer scripts to enable our users to get the most out of it. The ubiquitous ? ?Q1? ? was first introduced as a text substitution mechanism then as a value substitution mechanism. We could have used an off the shelf programming language (VBScript for instance) but we didn’t. You see, Market Research data is special…

Why is Market Research data so peculiar?
————————————————————

The first reason is that a question may have multiple values: multiple response and loops. If you ask someone which newspapers they know, they will give you more than one answer. In a grid question, asking people to rate every newspaper will give you multiple ratings. And loops are a generalisation of grids: How many people live in your house? Gender of the 1st? Age of the 1st? Gender of the 2nd? The other difficulty is that a question may have no value at all – two types of no value actually. A respondent may voluntarily skip a question by leaving it blank – we usually describe them as “no response” (or inappropriately DK for Don’t Know). Or the script may decide that a question is not suitable for a given respondent, we then talk of “Not Asked”.

Finally, questions and responses are rotated. Individual responses may not be available. Oh and there are continuous surveys where new responses are introduced and others are momentarily dropped.
So pretty much like a relationship status on Facebook, it’s complicated. But we’ve also wanted to keep it simple and training needs to be easy. Anyone (or their monkey – ahem) should be able to write a simple questionnaire. Because this is Market Research we also need complexity: trade-offs, max-diff, long winded screening out methods, quota rules where some cells are prioritised, and more.

Askia Script 1.0: founding principles
——————————————————-

AskiaScript 1.0 never really existed. The one advantage of having your own script is that it’s so easy to make it evolve – our only care is backwards compatibility. But there were some early principles that have been kept throughout its history.

a) The Askia script is driven by value substitution
In other words, in the following expression “MonthlySalary * 12” the value of the question is directly replaced by the value given by the interview. The engine hardly knows at all that MonthlySalary is a question.

b) Everything has a type and a dimension – a value is in hyperspace
There are 3 value types. A numeric question’s type is numeric. A closed question like gender is also numeric. An open-ended question’s type is a string and a date (or time) question will have a type “date”.
A simple numeric question has one value, dimension 0. A multiple response question’s value is a vector of values ({1;3;5} ) - dimension is 1. A single question in a grid also has a dimension of 1. A multiple question in a grid is a vector of a vector of values ( {1;3;5}; {1;2}; {4;1} } )– we call that dimension 2. A loop of a loop of multiple questions leads to a value where the dimension equals 3. In Askia, there has never been limitation on the number of loops; hence there has never been a limitation on the dimension of a value.

c) Everything is a value, an operator or a function
The aim of an Askia script was always to return a value: is a condition true or false, or to set the new value of a question, pretty much like a formula in Excel. All we needed in a script is a value or an operator (e.g. (1>3) or (2*24) ) – remember that questions are values. Right away we introduced functions – an algorithm that would take values as parameters and return a value (e.g. SquareRoot (9) return 3 or SelectRandom( {1 to 10}, 3) which returns 3 random numbers between 1 and 10).

Evolutions of Askia Script 1.0: the good, the bad and the ugly
———————————————————————————————

The Askia scripts have been driven by users; their suggestions, their questions (how do I do this? – ha, try this beta!) or their common mistakes. Functions have been added throughout, but there have been a few significant improvements I will outline now.

a) The Has keyword instead of the equal sign

If you only ask a question to men, it would be natural to write Gender = 1. But if you only ask a question if somebody is aware of the first newspaper in a multiple question, Newspapers = 1 would not work. It would mean only that the respondent has selected the first one and no other. What a user would have had to write is “the intersection of newspapers and 1 is not empty” – logical but not easy to explain to newbies.

So we have introduced the keyword Has and begged our users to use it. Newspapers Has 1 works for single and multiple question, it’s simple and intuitive. It makes scripts more readable and more reliable.
And we have expanded the keyword with HasNone, HasAll, HasAndNoOther and HasAllAndNoOther.

b) CurrentItem, friend or foe?

Let’s imagine you have a Rating question for a series of brands. It’s easy in Askia to find out if any of the ratings gets top marks (Rating Has 1). Now imagine you want to ask an open-ended question for each brand if the rating is bad, you either need to write as many routings as you have brands (e.g. Rating[1] Has 5, Rating[2]?? Has 5) or have a way of knowing in which brand you are at, at a given time. This is what CurrentItem does. So if you want an action right after the rating, you must write Rating[CurrentItem(1)] Has 5. If the question is in a double loop, you must write Rating[CurrentItem(1)] [ CurrentItem (2) ]. If you are an Askia user, you’ll know that… we repeat it and repeat it some more in training.
CurrentItem is de-rotated – in other words even if there is a rotation on the brand, Rating[1] refers to the first brand as it’s defined in the questionnaire, whatever order the brand was actually asked about in the questionnaire.

So CurrentItem does the trick, yet the fact that we need to hammer it home in training is proof that it’s not entirely satisfactory.

c) If Then Else And Loops

We initially thought that Ifs and Fors were not needed; we could create dummy questions or dummy loops to do this. Eventually we realised that the readability (hence the maintainability) of surveys suffered as a result. However, we didn’t want to break the third founding principle: that everything is a value, an operator or a function.

So instead of IF, we used Excel’s idea for formulae: the IIF (condition, ValueIfTrue,ValueIfFalse), but we improved it. We came up with On (TestValue, ValueIf1, ValueIf2,ValueIf3, ElseValue), the clever bit is because True is 1 (and False is 0), IIF and On were working in the same way.

Maintaining the third founding principle proved somewhat harder for loops. But we noticed that whenever someone needed For-Next loops, it was usually to sum something or to find extreme values. So we devised the ForSum, ForSet, ForMin, ForMax idea. Again it did the trick, but aesthetically it was never pleasing, and the jokes about a ForSum being a threesome + 1 proved tiring…

A new beginning, a new hope
—————————————-

We had a conversation at Askia about the things we could improve in the scripts. It was animated, but a few things appeared clearly:

1. We needed a proper grammar - forget functions, we needed variables, If Then Else, Fors and more. We needed the power of modern language.
2. Reminding everyone to use CurrentItem was tiresome - in 90% of cases, users want to check the value of the current item. There had to be a better way!
3. Value substitution was often counter intuitive - some of the script functions let you access meta-data information like the response text. Users would naturally expect the syntax ResponseText(Gender ) to work, whereas they needed to write ResponseText(“Gender”) and that’s because ResponseText ( 1) could not be understood by the engine as “Male”.
4. We need modern object notation - we use Object Oriented Programming daily, it’s actually quite good. Why not include it in our own language? Python notation was agreed to be elegant as well.
5. Improved support for entry codes - entry codes were originally designed to allow you to customise how to enter a response in our key-in entry software (RIP). But one of our clients (Infocorp) had the idea of using them to align responses across waves (before we introduced Surf). It’s now often used to provide a fixed ID to a response on a continuous survey. Therefore it’s pretty useful to define scripts using entry codes because they create stability even when you add or drop a response in a new wave.
6. Better encapsulation of quota, interview and browser information - more objects, that was good wasn’t it?
7. Backward compatibility - it is often said that backward compatibility is the enemy of innovation. But there is one thing we know, clients do not like to reprogram scripts that once worked.

Keen as Mustard
———————-

The temptation was to get working on it right away. There was so much to do and programming a compiler is pretty much nirvana-esque for geeks like us. But this was going to be one of the main building blocks for Design 6. We wanted it to be close to perfection and backwardly compatible.

We separated the work in two teams. One came up with the full specification – available here. The other one was in charge of implementing it. We asked for feedback, argued about it, counter-argued and finalised it. Along with every bit of grammar, we put together examples that we added into a database. Each record has a script, an indication if it should compile or not and the expected result. We came up with more than 400 individual tests allowing us to make sure that the scripts were right at all times (and in the future) and fast.

The object of your question
—————————————-

What is the result of all this activity? Well, a question now has properties and methods. In other words, a question is now an object. A question is directly accessible with its shortcut. In other words you no longer need to write Q1 … Q1 is enough.

The captions of a question are available with Q1.LongCaption or Q1.ShortCaption. The responses of a question are also object, hence Gender.Responses[1].Caption will return “Male”.

The actual answer given to a question is available through the Value property. Hence Gender.Value will return a number indicating the selected response (index starting at 1). Furthermore, to increase readability, the Value property is implicit – that is Gender + 1 will be interpreted as Gender.Value + 1.

The value property always references the question in the current item. This has a serious impact; it means that the variables manipulated by the script are either single values (number, date or string) OR an array of single values. You will never again have arrays with 3 dimensions or more even if we have loops of loops of loops! Also you won’t have to use CurrentItem(1) ever again! If you want to access values in other loop items, you use the Iteration property. For example Rating. Iteration(1).Value will return the rating for the first brand.

When you have loops of loops, it was always hard to remember where to put the CurrentItem(1) and the CurrentItem(2). Iteration lets you specify the shortcut of the loop control variables. Hence you can write Rating.Iteration(OuterLoop: 1,InnerLoop: 2) – equivalent to Rating.Iteration(InnerLoop: 2, OuterLoop: 1).

The Askia scripts were always de-rotated, meaning that the order of responses does not affect the returned value of a question. If not it would have been impossible to write routings. But you might need to know in which order responses are displayed or which ones are displayed, so we’ve introduced the `AvailableResponses` property. For example, `NewsPapers.AvailableResponses` will return an ordered array of responses indicating which responses are available at a given time and in which order.

Oh, and we wanted to ease the use of entry codes so we have introduced the methods EntryCodetoIndex and IndexToEntryCode. For example Q1.IndexToEntryCode ( {1 to 3} ) will return an array of the first three entry codes. You could also had them with:

Q1.Responses[1].EntryCode…

We live in a material world: everything is an object
——————————————————————————

We decided to take on Ruby’s programming language idea, to make everything an object. Numbers have properties and methods e.g. 5.Pow(2) will return the square of 5. So do Arrays e.g. {5;3;2}.Count is 3, {1;2;3}.Sum() is 6. And finally strings as well e.g. “abc”.ToUppercase() returns “ABC”.
You can combine calls one after the other { 1 to 10}.SelectRandom(3).Shuffle().IndexOfMin() or Name.Value.ToUpperCase().Replace(“JOHN”,J”. “)
And we have variables – and loops and ifs, for example:

Dim i
Dim str
For i = 1 to 10
If i mod 2 = 1 Then
str = str + i + “is odd”
Else
str = str + i + “is even”
EndIf
Next i

All in all the language is concise and elegant.

We have also taken in the ideas of PHP and ASP about embedded script with {% SCRIPT %}. So generating HTML, XML or JSON is straightforward. This will generate the XML for all responses of a given question, for example:

{% dim i
For i = 1 To CurrentQuestion.AvailableResponses.Count %}

{% Next %}

And if you are a programmer, you have probably heard of regular expressions, for example:

This will check if an email is correctly formatted:

dim email = “askia@askia.com
email.IsMatch(“\w+@\w+\.[a-z]+”)

This will check if a string is a proper UK telephone number:

dim rgUkPhone = “(\+|00)\s*\d{2}(\s?\d{3}){2}\s?\d{4}”
(“0044 207 689 5492”).IsMatch(rgUkPhone) ’ => true

We’re so excited, we can’t hide it and we hope you like it
—————————————————————————————

We are super excited about this, and that does not cover it. We are super extremely very excited – we are like kids on a 48 hour diet of sweets and fizzy drinks about to enter LegoLand. We hope you are excited too. Askia Scripts is a living language. It will evolve some more, to fit your needs. Tell us what you like, what you don’t like. We are thinking of ways so you can calculate utilities live on a conjoint survey, or predict behaviour and validate it with the user. We cannot wait to see what you will do with it.

Askia Development: askiavista 6 Release Candidate 2 is out!

Added by Paul Nevin about 5 years ago

[]({width:700px}https://dev.askia.com/attachments/download/9855/vista6-rc2.png):https://dev.askia.com/attachments/download/9855/vista6-rc2.png

We have finally updated askiavista 6 to Release Candidate 2!

This milestone includes the following new features:

  • Export to Excel (xlsx) All concerned askiavista elements can now be exported to Microsoft Excel (.XLSX) files. These Excel files will not only preserve your conditional formatting but will also export your charts to native Excel chart object, thus allowing you to further tweak them.

<!-- -->
- Copy and paste presentation / structure
Customise a question in Rows, Columns or Edges could it be by grouping response items, assigning a specific formatting, … and paste either the presentation, the structure (or both) to one or more other questions.

<!-- -->
- Ungroup responses recursively
Easily ungroup nested groups of response items via our `Ungroup all` feature that will recursively split all response items back to their original structure.

<!-- -->
- Allow overwriting question Profile and Portfolio items
You can now overwrite existing previously set Portfolio items and Profiles allowing you to quickly amend / modify your saved elements.

<!-- -->
- Create responses in Variables by crossing multiple questions by drag ’n drop
Need to create a Variable that simply crosses response items from two questions? Just drag and drop two (or more) questions into the Variables editor to automatically create as many calculated response items as required. You can also specify naming convention, separator character, DK and NA management as well as decide to not take certain responses into account.

<!-- -->
- Allow to re-arrange responses in calculated questions by drag ’n drop
Calculated Variable responses can now be reordered by simply drag and dropping the response items allowing you to avoid having to click 20 times on the Up or Down buttons ;)

<!-- -->
- Create sub-populations for each responses of a question
Simply select a question from the treeview and click the magic ‘Create Filter for each response’ button and you’ll obtain as many Filters as there are response items for the selected question.

<!-- -->
- Validation of Filter and Variable definition
askiavista 6’s Filters & Variables now include a definition validator that allows you to check the syntax, Shortcut, Caption, … of your Filter or Variable. Just hit the `Check variable` or `Check filter` button!

<!-- -->
- Collapse / expand the property grid
Hide all Properties when you don’t need them so you can focus on what’s important to you by Collapsing the Property Grid; Expand it when you need to fine-tune your table / chart settings.

As usual, you can freely access this update with the below information:
URL: http://show.askia.com/askiavista6/
User name: DEMOEN
Password: DEMOEN

Please remember to only access askiavista 6 with one of these browsers: Google Chrome, Safari, Firefox or Internet Explorer 10

Askia Development: Slides! updated to 4.2.1

Added by Paul Nevin about 5 years ago

:http://www.forgetdata.com/technology/editions.html

Slides version 4.2.1 is now available for download and contains updates to the following:

  • Much improved logging (see your Logs\\Slides.log) including better notification when things didn’t go to plan.
  • Improvements to various screens based on user feedback.
  • Lots of enhancements to TabsML¨ including the use ofHeaders/Footers,Sig Testing* and hiding of rows/columns.
  • Speedier slides start-up.
  • New scripting functions and libraries for you professional users.
  • Ability up update your existing license to the latest settings if your subscription settings are changed without having to fully re-activate slides.

For a full change list including a link to download this version, read more

In case you didn’t know this improves on the previous 4.2 version which already had a lot of great new features such as:

  • New Script editor for professional users with syntax highlighting.
  • New provider allowing Excel data to be used with Slides.
  • Lots of documentation updates
  • Lots of new Shape Settings.
  • Better handling of international number formats.
  • Ability to put values from individual cells into text objects.
  • Introduction of Slides! Professional and Slides! Express.

:http://www.forgetdata.com/technology/editions.html

Askia Development: askiaface for Android available! (1 comment)

Added by Paul Nevin about 5 years ago

[]({width:666px}https://dev.askia.com/attachments/download/9815/askiaface-android-soon.jpg):https://play.google.com/store/apps/details?id=com.askia.android

After Microsoft Windows & Apple iPad askiaface for Android is now available on Android devices!

This version is 100% up to speed with version 2.0.1 of askiaface for iPad and thus allows:

  • Full integration with the askiadesign & askiafield
  • Quota management
  • Modify interviews
  • Image, audio, video integration

This application is be supported devices running Android 4.0 and higher; you can check the minimum requirements as well as a list of supported devices

:https://play.google.com/store/apps/details?id=com.askia.android

Askia Development: Announcing askiavista 6 Release Candidate! (1 comment)

Added by Paul Nevin about 5 years ago

[]({width:750px}https://dev.askia.com/attachments/download/9371/vista6-RC.png):http://show.askia.com/askiavista6/

We’re thrilled to announce a major milestone in the development of askiavista we’ve released the Release Candidate for askiavista 6.0!

This is a very important update for our users as we have completely rebooted our online analysis application by making use of modern web technologies such as HTML 5, CSS3, LESS, AJAX in order to provide our user with:

A cross-browser / cross-platform standards-compliant web application

By harnessing modern web technologies, we allow our users to benefit from the power and ubiquity of a web application without having to rely on any proprietary plugin or asset. This allows us to make use of all the new possibilities packed within HTML 5, CSS & JavaScript such a vector graphics, CSS animations, local storage, new dedicated input fields and more.

Improved user experience

The aim of this major upgrade of askiavista is to focus on you, the user, in order to provide the most seamless experience when using the application. Part of this user experience has been achieved by means of an updated user interface that allows you to concentrate on what is most important to you. Another part of this comes from simplified usage patterns & processes, such as: automatically updated table & chart results, a unique access to all the settings & properties, question distribution (à la askiaanalyse), creating & sharing table definition templates, …

New & improved charting engine

We have included a new charting engine to askiavista: Highcharts. This data visualisation library is written in pure JavaScript, offering an easy way of adding interactive charts to your survey data. Highcharts currently supports line, spline, area, areaspline, column, bar, pie, scatter, angular gauges, arearange, areasplinerange, columnrange and polar chart types.

Brand new Variable & Filter builder

Filters (ex Sub-Populations) & Variables (ex Calculated Variables) can be the most useful elements and because they can sometimes be complicated to wrap your head around, we have completely redesigned our condition builder from ground up. You can now use the Assisted mode that provides a comprehensive user interface that allows you to build your Filters & Variables without any limit to the amount of conditions or sub-conditions; alternatively, you can use the Script mode that is now shipped with syntax colouring & code completion to help you build the most complex Filters or Variables in minutes!

This Release Candidate version of askiavista 6.0 is accessible for a test drive on http://show.askia.com/askiavista6/ with the below credentials:

  • User name: DEMOEN
  • Password: DEMOEN

Because we are currently updating this version on a weekly basis, please take into account the below limitations of this version:

  • Export is not yet implemented
  • ~~Number\ formatting\ not\ yet\ working~~ Implemented (18/01/2012)
  • Column Significance letters not integrated
  • New Tab Styles cannot yet be uploaded by the user
  • User preferences are not yet accessible
  • ~~Automatic\ view\ refresh\ not\ fully\ implemented\ (after\ deleting,\ editing,\ renaming\ an\ element)~~ Implemented (18/01/2012)
  • Keyboard shortcuts not implemented
  • Support for French locale not integrated
  • ~~Portfolio\ link\ themes\ are\ not\ styled\ yet~~ Implemented (18/01/2012)

Although we plan to extend our browser support, we currently only support these browsers: Google Chrome, Safari, Firefox and Internet Explorer 10

Askia Development: askiaface for iPad updated to v2!

Added by Paul Nevin about 5 years ago

[]({width:666px}https://dev.askia.com/attachments/download/9277/askiaface-ipad-v2.png):https://dev.askia.com/attachments/download/9277/askiaface-ipad-v2.png

We’re happy to inform you that we have released a major update of askiaface for iPad. This new version includes many new features and fixes:

  • Feature #4577: Resource management
  • Feature #4578: Modify interview
  • Feature #4579: Quota management
  • Feature #4659: Hardware identifier for each unit (iPad)
  • Bug #4590: Semi open not in the cca qes
  • Bug #4603: `AgentName` is not working properly
  • Bug #5071: `Year(now)` not returning correct value
  • Bug #5199: `WeekDay` incorrect in iOS

For the complete version notes, please check out the dedicated roadmap

This update is available either via Apple’s App Store automatic updates or as a free download

Askia Development: CTArchitect Flex: a cloud-based dialler

Added by Paul Nevin over 5 years ago

A couple of years ago, we introduced CTArchitect Soft Dialler, a software-based telephony dialler system created specifically for [[askiavoice:]] users. Traditional tailor-made telephony servers and hardware boards are replaced by a software-only solution, able to convert any server into a powerful dialler system.

Now, we’ve taken CTArchitect one step further, and brought our dialler solution to the cloud. CTArchitect Flex lets you tap into the power of our platform, without the need for any upfront hardware or software investment. That’s right: CTArchitect Flex can be rented on a project / monthly / agent basis. Here’s how it works:

  • you request a quote for the number of agents and the time your need
  • after approval, you gain access to our CTArchitect Flex platform, using a special supervisor login
  • you upload call credits on our CTSIP account, enabling you to make phone calls using VoIP technology
  • when the project is finished, you can download yout `.QES` file directly from the askiafield cloud system

…and that’s it!

Interested? Please contact your local Askia representative for more information.

Askia Development: How to ensure email addresses are valid

Added by Paul Nevin over 5 years ago

How can we be certain that the email address that is provided by the respondent is valid; not only the a@b.c syntax but actually a fully registered email address?

The classic way is to send an email to the respondent in which they are asked to click on a link. The link usually updates a database and that database is then read to ensure the address is live.

What we will do in this example is show you how to set up the database and the necessary `jQuery` code snippet that will block the respondent until they have received the email and clicked the link. We will achieve a live update of the screen so that the respondent is automatically notified that it possible to continue with the survey.

Head down to the [[Recruitment_Make_sure_EMail_Correct|full article]] for the entire run-through of this methodology and grab the example files!

And don’t forget to take a look at our [[KnowledgeBase|Knowledge Base]] as its full of useful resources!

Finally, as a side note, we’d like to thank Stephen Palmer from Teamsearch MR who added a really cool post on our forums detailing how to show / hide an image or element using a button.

;)

Askia Development: Internet Explorer update in askiadesign

Added by Paul Nevin over 5 years ago

For the last couple of years, askiadesign has been shipped with Internet Explorer 7’s rendering engine when using the `Web test` mode. This has proved to fail both for us and our users as legacy versions of IE are generally considered poor web browsers which are rarely standards-compliant and ship very few of the new technologies released by the W3C.

Thanks to Jérôme S (Can-Guru & Chariot of Fire) and Microsoft’s IE blog, we now have a way to control which version of IE we embed in askiadesign.

Depending on your version of Microsoft Windows you’ll be able to use:

  • Internet Explorer 8 ****
  • Internet Explorer 9 ****

You can either use the latest version available of the accursed browser or specify a specific version by means of the `Windows Registry`. For more details on how to do this, head to the appropriate [[ChangeYourExplorerVersionInDesign|Knowledge Base article]]!

Askia Development: askiaface for iPad is available for download! (7 comments)

Added by Paul Nevin over 5 years ago

Unleash the great looks and mass appeal of the iPad, with askiaface for iPad. Your CAPI projects will never have looked as good.
Askiaface for iPad combines the beauty of the iPad with the raw power of our survey design, data collection and agent management tools.

With askiaface for iPad you get:

  • A free iPad app: lets your agents connect directly (via askiafield) to complete mobile interviews.
  • Full integration: askiaface for iPad links seamlessly into other Askia products giving you advanced survey design features and effective fieldwork management.
  • Great looks: as a native iPad app that’s Retina display ready, you can deploy engaging surveys with your own images.
  • Control: as it’s built using askiaweb’s rendering engine you can easily customise your survey with CSS, graphic resources and JavaScript, to get the look just right.
  • Always ready: agents can conduct interviews on or off-line with off-line data being synced as soon as a device is reconnected.
  • Up to date: you can synchronise data easily using manual, automatic or scheduled connections. This automatically checks the latest version of survey, quotas, resources and messages making sure your agents are always working with the latest version.
  • Control of your projects: askiaface for iPad’s integration with askiafield means that supervisors can easily update the survey during fieldwork.

Want to try it?
It’s both available and free for iPads running iOS 5.0 or higher!

:https://itunes.apple.com/en/app/askiaface/id561669066?mt=8

More to come on this very soon ;)

(41-50/124)

Also available in: Atom