I was working through a raywenderlich.com tutorial and wrote this class as part of an Uber Challenge. The challenge called for a random joke generator where the backing store was a Dictionary of Arrays. In Swift, typing is loose, so there are many shorthand ways to express this data structure. Here is one way
Featured Post
Applying Email Validation to a JavaFX TextField Using Binding
This example uses the same controller as in a previous post but adds a use case to support email validation. A Commons Validator object is ...
Friday, January 30, 2015
Wednesday, January 21, 2015
Replacing tWriteJSONField with a Routine to Fix Threading Problem
Talend's tWriteJSONField component uses Java Threads, presumably to improve performance. However, this can throw a Main Flow into havoc when using globalMap. It's easy to form JSON, so I am replacing the standard component with a Routine and a tMap.
Saturday, January 17, 2015
Using Talend tGroovy to Verify a File Set
Generally speaking, prefer Talend components to code when creating jobs. Talend components can be configured in the Talend Open Studio Component Tab whereas configuring or parameterizing code must be done indirectly through Context Variables or the globalMap.
However, there's a case for preferring code when the number of components for a simple task starts to become unwieldy and affects readability. Verifying a single file with a tFileExist is clear in its intent and functionality. Verifying more than one file with multiple tFileExists presents readability problems. Significant Talend canvas real estate becomes cluttered with many components that taken together, perform a simple task.
In this case, I like to use code to reduce the clutter. This blog post shows how to do that with tGroovy, a Java-like scripting language that is more forgiving for beginners (and experts).
However, there's a case for preferring code when the number of components for a simple task starts to become unwieldy and affects readability. Verifying a single file with a tFileExist is clear in its intent and functionality. Verifying more than one file with multiple tFileExists presents readability problems. Significant Talend canvas real estate becomes cluttered with many components that taken together, perform a simple task.
In this case, I like to use code to reduce the clutter. This blog post shows how to do that with tGroovy, a Java-like scripting language that is more forgiving for beginners (and experts).
Subscribe to:
Posts (Atom)