Sunday, January 4, 2015

Top 5 Sublime Plugins

Sublime Text is a hugely popular text editor targeting the developer community. One of the most powerful features is the rich plugin ecosystem which has grown and thrived in recent years.

Before you get started with any of these stop and install Sublime Package Control.  This is the essential first step after installing Sublime Text. It makes installing and managing all other plugins a breeze. Below are my top 5 which I recommend to all of my teams:

  • SublimeLinter: Lint support for Sublime to show in-line and summary reports
  • SublimeLinter-jshint: As most of my work is JavaScript based this one is essential. Ties in with your project .jshintrc file to give in-line error and warning highlighting
  • EditorConfig: Auto-sets your indentation and line ending preferences to match the .editorconfig file in your current project. Not using EditorConfig in your projects? Check out my previous post on consistency for more information
  • BracketHighlighter: Highlights your brackets and tags making it easier to see where they close (or don't!)
  • HTML5: A bundle containing lots of useful snippets for code completion when writing HTML
Depending on which project or language/framework being used I also tend to recommend the corresponding bundle (e.g. AngularJS bundle, KnockoutJS etc.). There are plenty of other plugins to help make Sublime Text the best editor I've used so far. I'm keeping an eye on the Atom editor which is looking interesting but it's going to take a lot to move me away from Sublime.

Saturday, June 21, 2014

Achieving Consistency

One of the more challenging aspects of managing a team of developers is maintaining standards and style of coding. It may seem trivial but even small things like an individual developer's tab setting can quickly lead to check-in chaos and code review hell.

There are loads of tools out there no to help but one of my favourites is EditorConfig. It doesn't do a lot but goes a long way to help keep the style consistent.

http://editorconfig.org/

There are already plugins for multiple editors (including Sublime, Notepad++, Vim, Atom etc.) so you don't have to fight for everyone to use a single IDE (and with this being such a personal choice I wouldn't advocate trying!). Get the team together at the start of a project, agree on the settings you'll use and make sure everyone has the plugin to keep the styling consistent. Obviously this only affects the basics such as tabbing, line spacing etc. but combined with a good JSHint config (for example, if developing JS) really goes a long way to helping maintain a consistent code base.

Sunday, March 16, 2014

The saga behind becoming a Canadian Permanent Resident!

After months of waiting we finally received our Canadian Permanent Residency this week!  We read countless forum posts trying to work out the expected timelines but in the end none of them were particularly accurate.  For anyone going through the same process my advice would be to stay patient and know that it is coming despite a lack of updates; don't read too much into the panicky forum posts you'll find around the net. Also, double and triple check all of your forms.  We had some friends that got forms sent back for being incomplete and that really seems to delay your application.  For reference our time line was as follows:

  • Jan 2013 - Applied for Provincial Nomination (PNP) in BC (we live in Vancouver)
  • Feb 2013 - Received our PNP approval and started collating all of the documents to send to CIC
  • March 2013 - Sent our application pack into CIC 
  • April 2013 - Received notification from CIC that they had received our application
  • May 2013 - Were asked to complete a medical exam (others we had read about received this request much later in the process, it seems to vary).
  • May 2013 - We booked our immigration medical (be warned; it's not cheap and you can't claim any of it on MSP or any other insurance policy).  The centre we went to on West Broadway in Vancouver sent the results directly to CIC for us (not for free of course!)
  • June 2013 - Noticed on the CIC website that our status updated to "Medical Results received" but the overall status was still just "Received"
  • September 2013 - We were asked to submit our Right to Permanent Residency fee along with most recent copied of our passports (mine was set to expire fairly soon) along with an updated list of our most recent activity in the country.
  • October 2013 - After sending off and received my updated passport we sent all the requested information to CIC.  That was the last we heard from them in a while (our status on the CIC tracking website still read "Received")
  • Feb 2013 - Our status on the CIC website finally changed to "In Process" but we didn't get any correspondence to go with it
  • March 2013 - Our status on the CIC website changed to "Decision Made".  Again, no correspondence to go with this.
  • March 2013 - Our Confirmation of Permanent Residency letters arrived in the mail about 3-4 days after the status on the website changed to "Decision Made".  If I hadn't checked the status website these would have arrived completely out of the blue.  Unlike others we know we didn't get any emails about these status changes.
Hopefully the above will help others in a similar position.  The wait times seem to change fairly frequently and the order you get emails/status updates seems to vary widely between applications so stay patient and it will come through!  We applied within Canada (we were on work permits before hand) so once we received our COPR we drove down to Peace Arch to activate the permits (you need to take the letter with you along with passports).  We had read that you needed proof of address but they didn't ask to see it; we were just asked us to write down where we wanted the PR card to be sent. 




Next step, PR cards!  We were told they would take around 6-8 weeks to arrive but you won't need them to get your new permanent SIN and MSP.

Tuesday, January 7, 2014

Troubleshooting LiveCycle Workbench Compatibility errors

I've come across a problem a few times using Workbench when trying to connect to servers only to be told I can't because there is a version number mismatch (even though both Workbench and the server are at the same service pack level).  One way around this temporarily (if you know the versions are the same but for some reason the server version is being reported incorrectly) is to disable the compatibility check in Workbench:

  1. Open your workbench.ini file (usually located in C:\Users\<user_name>\Apps\Adobe LiveCycle Workbench ES3\workbench
  2. Locate the line "-Dcom.adobe.connection.compatibilitycheck.disable=false
  3. Change the value to "true"
  4. Open Workbench and try to connect to the server again

Wednesday, April 3, 2013

Setting up WebLogic as a Windows Service

A common requirement when dealing with any application server install on Windows is to set it up as a Windows service.  It's a bad idea to rely on the command line for running the server as it makes it far harder to administer.

For WebLogic the steps to do this are available on Oracle's website:
http://docs.oracle.com/cd/E11035_01/wls100/server_start/winservice.html

A useful diagnostic if the service doesn't appear to be working is to try and invoke the service using the beasvc command.  See the section "Verifying the Setup" in the above link for more information.  More times than not if your service isn't starting then there was an error in the script you used to create the service in the first place (e.g. JVM argument).

Friday, March 1, 2013

JS Libraries

Below is a list of libraries I've come across which in all my reading and investigation recently into HTML5 / JS which should come in handy.  More of a "remember these for later" post:

  • http://underscorejs.org/
  • http://modernizr.com/
  • http://angularjs.org/
  • http://qunitjs.com/
  • http://momentjs.com/
  • http://requirejs.org/ (and http://requirejs.org/docs/api.html#text)
  • http://html5boilerplate.com/
  • http://fortawesome.github.com/Font-Awesome/
  • http://blueimp.github.com/jQuery-File-Upload/
For more popular projects GitHub's starred repository list is a good place to start (gives an idea of highly active/popular projects):
  • https://github.com/popular/forked
  • https://github.com/popular/starred

Monday, January 14, 2013

Vertical clustering in LiveCycle ES3

Quick note for future reference: the document for ES2 (http://help.adobe.com/en_US/livecycle/9.0/clustering_jboss.pdf) explains how to change the necessary ports in order to get a vertical JBoss cluster up and running.  In ES3 (and therefore JBoss 5) the paths for a number of the ports has changed:

JBoss 4:
jboss-service.xml file located in [appserver root]\server\[profile]\conf

JBoss 5:
bindings-jboss-beans.xml file located in [appserver root]\server\[profile]\conf\bindingservice.beans\META-INF

Saturday, October 27, 2012

AJAX Style file uploads using an iFrame

I was recently trying to solve a strange issue with Internet Explorer 8 (it's always IE...) on redirecting the user after successfully uploading a file.  Couldn't use HTML5's FileUpload API as we had to be able to support older browsers but what we wanted was AJAX style in place uploads without having to redirect users back to the page after they had uploaded a file.

Then I came across the following blog post:
http://www.alfajango.com/blog/ajax-file-uploads-with-the-iframe-method/

This method feels like a bit of a hack but is a decent solution to the problem.  Target the empty iFrame and you can keep users on the same page.  It seems to be a popular method and one I'll use again until we can finally move to using the proper HTML5 API for doing this.

Friday, September 21, 2012

Working with lists

This is more a note to remind me in future but when dealing with lists in LiveCycle it can sometimes be a little tricky to just keep adding to a list without creating a loop.  An easy way to do this within one set value step is to use the collection size to determine the index for adding something to the list.

Here's an example XPath statement which will add to the end of the list (where "listAttachments" is your list variable):

/process_data/listAttachments[number(get-collection-size(/process_data/listAttachments)+1)]

Thursday, September 20, 2012

WebLogic LiveCycle ES3 Installation

On a recent installation of LiveCycle ES3 on WebLogic I realized that I had started creating a list of "extras" which I often needed to do before the installation would work properly.  These might not always be required and may in fact be buried in the documentation somewhere but here's the list regardless:


  • Setting up the servers (both Admin and Managed Server) as Windows Services.  Not strictly a LiveCycle step but useful nonetheless.  Just don't forget to copy the lines you added to "startManagedServer.cmd" into your new service. 
  • Adding the SQL driver to the classpath.  When using SQL Server we need the sqljdbc4 JAR file in the CLASSPATH.  Unfortunately the text LiveCycle gives you during the installation to copy into your startup script doesn't include this.  Again this might be the way we had configured WebLogic but I needed to add the path onto the end of the CLASSPATH supplied in order to get us talking to the database (we had setup the data source manually in WebLogic rather than bundling it into the LiveCycle EAR files.  
I'll keep adding to this as and when I come across other configurations.

Wednesday, February 8, 2012

Knockout.js

It’s been a hectic couple of months with my move to Canada but having now settled in I hope to be able to write a few more posts on some of the technology I’m working with.  My most recent project is HTML5 and JavaScript based which has introduced me to a new library – Knockout.js.

The reason for choosing Knockout was simple; we needed a library which could manage data binding and that could map from JS objects to JSON.  Knockout (plus the mapping plugin) filled those needs perfectly.  For those moving over from the world of data binding in Flex it will quickly feel familiar. 

Over the next couple of weeks I’ll be posting about some of the pitfalls we encountered whilst using the library and some tips on how to most effectively use it.  I’ll also be relating some of the concepts from ActionScript/Flex which should help others making the transition over to the HTML5 world. 

Saturday, November 19, 2011

Moving across the pond

I've been a little quiet on my blog recently; moving from the UK to Canada took a little more of my time than anticipated! I'm now living in Vancouver, BC although in temporary accommodation until we secure an apartment. As soon as I'm back up and connected properly I'll be starting a series of posts on my recent mobile development experience with some tips on getting started with Flash Builder 4.5 for mobile.

Tuesday, November 8, 2011

New resource for ADEP information on Adobe Blogs

A new blog has been created by the guys at Adobe to collate all the best posts from around the web which focus on ADEP and other Adobe enterprise products.  Well worth a visit and there is already some great content up there:

The ADEP Post
The ADEP Post is a human-moderated aggregator of the best user assistance content created by the LiveCycle/Adobe Digital Enterprise Platform community. The community at large includes partners, users, customers, and Adobe professionals.

This blog aggregates content relevant to both the LiveCycle Enterprise Suite as well as the recently-released Adobe Digital Enterprise Platform

Friday, October 14, 2011

Removing images from ImageFields using JavaScript

When adding an ImageField to a form it's a common requirement to allow a user to remove the image.  By default clicking on the image field will only let the user replace it with another image.  If you want to remove it altogether then this little piece of code attached to a button will help:

imageField.rawValue = null;

Tuesday, October 11, 2011

Overview of the ADEP Document Services modules

When LiveCycle became ADEP Document Services all of the existing modules were ported over but I thought it would be useful to revisit them all and see what as new.  This post gives a summary of the modules which are available to any Document Services solution (excluding the foundation services which come with all Document Services modules) and should be familiar to those who have worked with LiveCycle ES1/ES2 in the past.

Monday, October 10, 2011

LiveCycle Content Services in the ADEP world

Server

A source of confusion I've come across when explaining the new world of ADEP to those familiar with the LiveCycle days is what has happened to Content Services.  Content Services was essentially the repository for storing files and anything else you needed persisting in your application.  It was built around the Open Source CMS by Alfresco and was used on almost all of the projects I worked on.  In the move to ADEP it's the one module the fate of which I wasn't 100% sure of.

Sunday, October 9, 2011

Defining Document Services Custom Components (DSCs)

Plugs

I've written a few custom components in my time working with ADEP but recently came across an excellent summary of what exactly these little (or in some cases large!) pieces of code actually are.  A recent blog post on the Adobe ADEP blog summarised it nicely:
A DSC is a component that can be installed on a Documents Server and introduces new functionality. It stands for Document Service Component. Most product components are DSCs but customers can write their own DSCs to create new integrations or functionality that require a higher level of sophistication than is appropriate with the use of standard integration options (e.g SOAP) or scripting/process maps. They are basically POJOs with nifty enterprise configurations around them that allow enterprise class life cycle, versioning and configuration (e.g. in an enterprise BPM system you don’t necessarily want a new version of a component to alter the way an inflight process is operating, or how a completed process reports audit data…) or even have to bounce the server to change the implementation of the DSC. It is definitely part of the secrete sauce of LiveCycle/ADEP Document Services.

Source: ADEP Blog

Wednesday, October 5, 2011

The rarest of things - user friendly customer service

It's a sad state of affairs when I feel compelled to write about a good customer service experience but that's where we are at the moment (and something that I've seen improved hugely with tools such as those Adobe is creating at present but more on that in a later post).  I had a problem with my HTC Desire HD phone (the SIM card cover was a bit wobbly) so decided to set about ordering a replacement.  I logged onto the HTC website dreading what I presumed would be a long and painful process of filling out some long form before waiting days if not weeks for a reply.  What I actually found was an easy to use support system with a variety of different options to go about submitting my query.

Screenshot of the HTC support chat


Clicking on the "Contact Us" button (note to HTC - this was a little difficult to find as I had to scroll through a long page of images to do with the phone before reaching it) popped out a tabbed window with three options: call (with long office hours), email and chat.  I went straight for the chat option and sure enough was instantly through to a human (thankfully not one of those terrible robots that tries to guess the answer to your question with some hopeless FAQ page).  The agent was helpful and got everything sorted for a free replacement SIM card cover in no time at all.

It's this sort of experience that keeps customers loyal.  I've never had an experience as easy as the one I just had with HTC and have already told colleagues and friends about how good they were in resolving my problem and it will certainly make me more likely to buy one of their phones again.

Now if only my bank provided a service like this I could finally stop giving myself a hernia every time I have to ring up...


Monday, September 26, 2011

Posting source code on Wordpress.com hosted blogs

The one plugin I loved from hosting my own Wordpress.org blog was the excellent SyntaxHighlighter plugin.  After trying to replicate it on Wordpress.com I eventually found that it's already baked in but woefully under documented. Follow the link below for the documentation on how to start using it:

http://en.support.wordpress.com/code/posting-source-code/

Acrobat Reader Extension limitations

I've been doing a piece of work for a customer who wanted a simple form distributed around their organisation for staff to fill in and return.  The only additional requirement was that end users need to be able to save the document whilst filling it in.  Most of my work to date has been using the Adobe LiveCycle product suite and so I naturally turned to Reader Extensions ES2 which would give end users the ability to save documents offline but comes at a rather large premium in terms of licence costs.