Stephen Smith's Blog

Musings on Machine Learning…

Archive for February 2013

Frustrations in Developing Mobile Applications

with 14 comments


Recently I’ve been talking to many people about various techniques to develop portable mobile applications. In the good old days of the 90s with the Wintel monopoly usually you could just develop for Windows and you would reach 99% of the market. The main challenge was just adapting to new versions of Windows where you would get things like UAC thrown at you.

Now suddenly we are developing for various Windows devices, various Apple devices and various Android/Linux devices. Plus we have some other contenders like Blackberry clamoring for our attention. The market is now highly fragmented and all of these have considerable market share.

I develop business applications and the functionality I’m most interested in has to do with ERP and CRM workflows. This means I’m not writing games, although it would be fun to produce a game like “Angry Accountants” or “ERPville”.

I know I’ve blogged about mobile development a few times like here and here; but my thinking on this keeps changing and I’m still not happy with the whole situation. There are many mobile frameworks and I’m only touching on a couple of representative ones here. I’ve got to think there will be a better solution, but until then I feel like ranting.

mobile device frustration

Going Native

There is an appeal to going native. The native development environments are really excellent. I’ve been playing with Apple’s XCode development tools for OS/X and iOS development and they are really amazing. They’ve progressed a lot since I last saw them over 20 years ago when I worked for a company that did NeXTStep development for the NeXT cube. Similarly Visual Studio 2012 for Windows 8 development is really quite good and so are all the Android tools.

If I only needed to development for one of these, I would be happy with any one of them. But keeping several in my brain at once really hurts.

You get the best results for the given platform with any one of these, but you don’t really get anything reusable except the basic design. All the platforms use a different object oriented extension of C (namely Objective C, Java and C#). All the platforms have different operating system functions and different separations between what you do in the application versus have as a service.

C Reborn

One surprising thing I found from talking to people was that the idea of writing as much as you could in C. All the main platforms use extensions of C and all support compiling and running C code. This reminds me of the old days where you tried to write a portable application for Mac, Windows and Linux by isolating the operating system dependent parts and then writing as much code as possible in good old portable C. Funny how what was old can be new again. But then it was a good idea back then, why wouldn’t it be a good idea now?


Much maligned Adobe always seems to have a proprietary solution in the game. With Flash being booted from most platforms, Air seems to have followers in some areas. Some people really like Adobe development tools, I’ve always found them strange. Like with Flash, uses ActionScript which is a nice object oriented extension to JavaScript, but then that makes it all non-standard. Then strangely you have to structure Flash projects as a movie which I’ve never liked. Air seems to claim to follow standards but then keeps dragging in Flash technologies. My own bias is that if you go down this route, you may as well stick with using JavaScript which is then more standard and more cross platform.

The other problem with Adobe is that they are the leading vendor in producing software with giant security flaws. This means they are more likely to be blocked or dropped from platforms. It is also a big risk for app development since your app could be tarred by Adobe’s problems.


Xamarin takes the Mono project and ports it to mobile devices like iOS and Android. The goal then is that you can develop a C# Windows application that will also run on iOS and Android. We tried Mono as a way to move some .Net projects to Linux, but just ran into too many problems and had to give up. As a result Mono has left a bad taste in my mouth so I’m inclined to avoid this. I also wonder how much code you will have putting the .Net runtime on top of the native iOS or Android operating systems. Is this just going to have too many layers and is it just going to be too fat and bloated?

If they can pull it off with high quality and compatibility there is potential here, but I suspect, like Air, you will just get a big non-standard mess.


Ever since the first Netscape browser we’ve been promised that the web will standardize all programming. Then came a proliferation of web standards and incompatible browsers. Now things are coming back together in the web world. We have good standardization on HTML5, JavaScript and CSS. We have a number of browsers with good support for these and they run on pretty much all PCs, laptops, tablets and phones. So you would think you can just develop once as a web application and run happily everywhere.

Unfortunately all the vendors have a vested interest in their app stores (like iTunes). Vendors like Apple, Google and Microsoft make 30% off all software sold through their stores. They make nothing on people running web applications from browsers. As a consequence quite a few native platform functionalities are held back deliberately from the web. Then they market hard that for the best experience you must use a native app form their store or you are getting a second rate experience. Strangely the reverse is often the case where the app is just providing a subset of some web site and you lose abilities like being able to zoom.

In the current market/environment it’s very hard to compete against native apps with web apps which is really too bad. I think at some point the app store monopoly will fall apart, but that is today’s reality.


Phonegap is an open source library to try to bridge the gap between HTML/JavaScript apps and native apps. It adds a hardware API for JavaScript apps and allows them to be packaged for distribution via app stores. Phonegap was recently purchased by Adobe which really worried me. So far Adobe hasn’t done anything bad (that I’ve seen) and hopefully it will survive as a good open source solutions.

The main risks with Phonegap is that it usually lags the native apps in adoption of new operating system features, Apple may at some point start rejecting apps made with Phonegap and Adobe may start adding proprietary Flash like technology.

Beside these drawbacks the other problem is that your app is still made out of Browser controls and not the UI widgets that are part of the underlying operating system. You can style away a lot of differences but discerning users will be able to tell the difference.

Phonegap is a great technology which does really help JavaScript/HTML apps be more native and is really worth considering if you go down this road.


I’m still frustrated. I’m not really happy with the quality of apps produced by the cross platform technologies and I don’t like developing the same thing multiple times using the native SDKs.

I also find it a bit monotonous to develop the same program over and over again for iOS, Android, Blackberry and Windows.

Written by smist08

February 23, 2013 at 11:34 pm


with 5 comments


There was a discussion on LinkedIn the other day, that was started since the latest version of Sage 100 ERP only allows one copy of itself to be installed on a given computer. Many programs operation this way such as most Microsoft products and other Sage products like Sage 300 ERP. The main reason for this is to avoid confusion for users when they are using integration technologies like COM or .Net. Since then it’s easy to know what you are talking to when you integrate from another program. This is also how the Windows Installer works, so if you want to use this technology then this is what you get.

But the topic came up as to what to do to support multiple customers? The answer given was to use virtualization. We use this fairly extensively here at Sage for Development, QA and Support. This blog posting is to cover a bit more fully our uses of virtualization and some of the things we have discovered along the way.



The Sage 100 and Sage X3 groups use Oracle VirtualBox. This one is nice because it’s open source (Oracle acquired it as part of Sun). I’ve run VMs created with this, but never created one myself or have too much experience with it.


The Sage 300 team uses VMWare. It used to be that you could use the VMWare player for free, but now it is only free for non-commercial use, but at least it’s fairly cheap. Generally you only need the Player and not the Workstation version. One nice feature is the unity feature which does an amazing job of integrating the virtual environment with your desktop environment which is good for demo purposes.


For server based VMs we use VMWare because our experience is that the memory usage is much better than the Microsoft Windows Server versions (but I haven’t played with Windows Server 2012 yet). The MS Server ones tend to force a lot of locked memory and you can’t run as many VMs. Our support department keeps a library of all supported operating systems times all supported versions installed, so if a client problem comes up say running XX version 3 on Windows XP 32-bit, then we boot up the right VM and try to reproduce the customer’s problem.

Generally we find it useful to create a base operating system image like Windows 7 (64-bit) and keep a clean copy that we update every now and then with Windows updates. Then when we want a VM we just get a copy of the base operating system and install what we want on top of it. (We also keep some images of popular operating systems with office and SQL Server as a better starting point). Generally to give a quick way to get running when a need arises.


We used to use MS VirtualPC a lot, but have moved away from it because MS doesn’t seem to be updating it anymore and it doesn’t support 64-bit client operating systems. This one is included with MSDN subscriptions, so it you have one of these, you probably have access to it.

It seems Microsoft is repurposing its VirtualPC software to their XP Mode feature to allow you to run Windows XP only software easily on Windows 7.

Client Operating System Licenses

Generally all the developers at Sage have an MSDN Universal subscriptions so this gives us the licensing to do what we need with the client operating systems. But for most development partners, there is a lot of benefit in having an MSDN subscription yourselves.

Hardware Requirements

One disadvantage of virtual machines in the past has been how large they are (usually around 32Gig). This uses up disk space fast, but with cheap 3TB hard drives, this doesn’t seem to be much of a problem anymore.

I’ve found the main thing you need for good performance in virtual environments is lots of memory. If your computer has 8Gig RAM then you can allocate 4Gig to the VM and still have 4Gig for your base operating system. Even though I find frequently switching back and forth between things in the VM and things in the base operating system can be slow, so I like to work for longer periods in on or the other.

Also quite a few laptops have hardware virtualization support turned off by default, going into the BIOS setup and turning this on can speed up VMs quite a bit.


To me virtualization software is quite amazing. I’m astounded that I can just run Windows 8 or Linux easily on my Windows 7 laptop. I think virtualization software has come a long way and is still progressing quickly. If you haven’t tried it out recently and you need to keep things separated, then you really should try one of these out. It saves a lot of headaches not having to worry about the installation of one thing messing up something else you have installed.

New Payroll with Sage 300 ERP 2012 Product Update 1

with 3 comments


With the upcoming Product Update 1 for Sage 300 ERP 2012 we will be releasing new versions of Canadian and US Payroll. These now have the new names of Sage HRMS Canadian Payroll 2012 and Sage HRMS US Payroll 2012. These will be separate installations that you need to download along with the main Product Update 1. The new name is to reflect that this is the common Sage Payroll used in several Sage products (including Sage HRMS), but since this is based on Sage 300 ERP Payroll, for Sage 300 ERP users this will just appear as a new version. The benefit of sharing the Sage 300 Payroll is to pool some development resources to get further product enhancements incorporated to the core product.

There are quite a few new features across this offering, so I’ll quickly list them whether they apply to both Payrolls or just Canadian or just US.

Common Features

Payroll Tax Number: A new Tax Number field has been added to the Company tab on the Payroll Setup > Options window. You can assign a tax number for each company or database.

Common Deduction Limits: You can use this screen to associate multiple deductions based on a single limit and ensure that employee deductions do not exceed defined annual maximums. Multiple deductions can now be combined to allow a single annual maximum to be applied, removing the need for manual calculation of group limits for multiple deductions such as union dues, garnishments, and retirement plans. And of course there is a matching report.


General Ledger Accounts for Workers’ Compensation Groups: Employer expense and liability accounts from General Ledger can now be associated to a workers’ compensation group so that the expense and liability codes associated with that group post in the General Ledger batch file. With this enhancement, a complete picture is provided of the employer cost associated with each check run.

Workers’ Compensation Codes Modifications: Allow assignment of a G/L account to a Worker’s Compensation Group, and include:

Expense Account – The General Ledger expense account posts the employers’ portion of workers compensation.

Liability Account – The General Ledger liability account posts the employers’ portion of workers’ compensation.

Workers’ Compensation Transaction Reports: A new report format, G/L Transactions, lists the applicable assessment amounts of employee earnings and the amount of the General Ledger transaction, as well as the associated expense and liability accounts. This report also helps identify check details with missing G/L account associations. The Retrieve Assessments from Payroll Register option on the Workers’ Compensation report window allows processing of four new transaction reports. Existing reports have not been changed.

Transaction History:  With the introduction of workers’ compensation calculations, you can now enter any adjustments for workers’ compensation using the Transaction History window. The Transaction History window now contains additional fields needed for adjustments to workers’ compensation; the Base, Rate, and Assessment.

The Transaction History Report has been modified to include workers’ compensation information, applicable both as a total and on the employee level, detailing the employee’s earnings and the associated assessment amounts, bases, rates, and workers compensation groups/codes.

Cheque Printing Security Enhancements: Sage HRMS Payroll 2012 has been enhanced to improve security measures during the Cheque Printing and Posting process. With this update, users with security permissions that limit access to certain employees will no longer be able to print cheques for employees to which access is restricted.

Pre-Cheque Payroll Register and Payroll Registers: The Pre-Cheque Payroll Register and Payroll Register have both been modified to include workers’ compensation information when applicable, both as a total and on the employee level, detailing the employee’s earnings or hours and their associated assessment amounts, bases, rates, and group codes.

Employer Match Calculations for Timecard and Manual Check Entry: Two new fields are now available in Sage HRMS Payroll on the Timecards and Manual Checks windows. The new fields are available to allow you to temporarily change the employer contributions to the deductions during the Timecard or Manual Check entry process.

Expanded Cost Center Override: You can now define the cost center override for deductions with the Flat calculation method setting in the Earnings and Deductions setup window. Select the Cost Center Override Allocated Based on Calc Base check box on the Basic Info tab, and complete the Calc Base tab to apply the overrides. After an earning is associated with a flat deduction type, the deduction will then be allocated based on the associated earnings allocation.

International ACH Transfer (IAT): The new NACHA International ACH Transaction (IAT) rules require each transaction to be classified as foreign or domestic, allowing the depository financial institutions to identify whether the transactions meet their review requirements as outlined by the US Treasury Department. The IAT rules exist to identify the financial institution responsible for moving the funds rather than the originator or receiver of the funds. Any financial institution outside the territorial jurisdiction of the US that is involved in a payment transaction where the institution is moving the funds from the originator or receiver are required to transmit the transaction using the new IAT format.

Employee Work Location: A new tab, Work Location, was added to the Payroll Employees > Employees record window. On this tab, you can enter address information about an employee’s work location.

US Only Features

Sage Payroll Tax Forms and eFiling by Aatrix: This functionality provides updated reports and forms at no cost and enables you to fill out and file tax forms electronically for a small fee; including W-2, W-3, U.S. federal forms (941, 943, 944, and 945), U.S. state tax forms, and new hire reporting by state. The first time you sign in to Sage 300 ERP after installing Sage HRMS Payroll, Sage 300 ERP uses a secure connection to automatically register your company with Sage Payroll Tax Forms and eFiling by Aatrix.

Assign Tax to Employees: Instead of assigning taxes to one employee at a time, you can now assign a tax to multiple employees in a single operation. Selection criteria can be used to assign taxes to groups; for example, a state tax can be applied only to employees who live in a selected state.


The following new windows and reports have been added, moved, and consolidated to support Sage Payroll Tax Forms and eFiling by Aatrix:

  • New Federal Tax Filing window: You can use this new window to fill out federal tax forms for the purpose of printing or e-filing them.
  • New State Tax Filing window: You can use this new window to fill out state tax forms for the purpose of printing or e-filing them.
  • Moved 941 window: The 941 window has been removed from Government Reports, and now appears in the list of forms on the Federal Tax Filing window.
  • Consolidated W-2 Tax Filing window: The W-2s on Paper and W-2s on Disk(ette) windows have been replaced with a single W-2 Tax Filing window.

Child Support EFT: Sage HRMS Payroll has been enhanced to generate federally compliant Child Support EFT files for all states that require electronic submission to a State Disbursement Unit (SDU). A new tab, Garnishment, is available on the Payroll Employees > Employees record, which allows entry of data pertaining to a specific employee’s garnishment. The data entered on the Garnishment tab is used in the creation of EFT files using Generate EFT File while meeting Federal and State guidelines.

US Citizen Field: A new US Citizen field was added to the Class/Schd tab of the Payroll Employees > Employees record window. Selection of this option designates the employee as a US citizen.

Canadian Only Features

Support for Multiple QEIR and EIR Numbers per Employee: You can now enter both federal (EIR) and Quebec (QEIR) Employment Insurance rates for employees who are working between Quebec and other provinces. Sage HRMS Payroll calculates EIR if the Province of Employment field is set to provinces other than Quebec in the Employee record, and calculates QEIR if the Province of Employment field is set to Quebec. You will no longer have to add or remove EIR or QEIR depending on the employee’s work location.

Updated EFT Format For HSBC Bank: A new Bank format for HSBC was added in the Payroll Setup > EFT Options window.


People who are familiar with the internals of Sage 300 ERP may puzzle a bit about the versioning of this product. The official external version is 2012 like the rest of Sage 300 ERP 2012. However if you dig into the internal version numbers you will find that the main products are version 7.0A and then the Canadian tax tables are 7.0D and the US tax tables are 7.0G. So why is the version 7 when the internal version of everything else is 6.1A? The reason is that Sage HRMS Payroll is now the Payroll of several other Sage products and has its own versioning. Similarly why don’t the tax tables start at 7.0A, again the reason is that the earlier letters have already shipped with other products and that is where we are jumping in.


As you can see from all the features added and changes made that this is a fairly substantial update to the Payroll modules for Sage 300 ERP. Now that this is the standard Payroll module across several Sage products we should see more good progress. Certainly more than you would usually see associated with a Product Update.