Showing posts with label Development. Show all posts
Showing posts with label Development. Show all posts

Sunday, December 15, 2013

Xamarin Mobile Development: Consuming Java Libraries from C# in Xamarin.Android - Part 2

On a previous blog post on Xamarin mobile app development and Android, we talked about how third-party libraries help to significantly cut down on the mobile development time by allowing app developers to not worry about building certain things, like a custom UI control or a client service. We also learned about binding and converting as well as what sort of things we should consider before getting started, like having a proper Java decompiler ready.


With all of these things set up and ready to go we can dive deep in some work!


 


We start by creating a new Android Java Bindings project


 


After Xamarin creates and loads the project, your Solution Explorer will have this content:


 


I'm going to explain what each folder is for:

* Additions: allows you to add C# arbitrarily to the generated classes before they are compiled. This can be helpful for providing convenience and extra functionality like new methods to have pure C# classes.
* Jars: this is the jar files in which the bindings should be generated.
* Transforms: usually, you will need to access to the transform files after the bindings project reads out all the information from the jar; so you've got to use these files to modify the library before it becomes an assembly. The reasons to interact with these files are:

               - To fix issues with the binding (very common)


               - To customize the API design by changing names or types, by removing unused pieces, etc.


Now, start by adding the Jar file into Jars folders. In this case we want to create link of this native code to C#, so in Properties Window you need to make sure to change Build Action to EmbeddedJar. If the Jar is only a dependency of another one and you don´t necessarily need to link the code, you'll set EmbeddedReferenceJar (although this is not case).


After doing that, if you build the project (F8) you'll receive 12 errors. But don't worry, this is a typical process when you're binding a native library.


 


As I previously pointed out, you'll touch the Transform files to fix binding issues.


Unfortunately, in the Xamarin documentation there is not too much information about how to fix these kind of errors.


I strongly recommend that you use a reflection/decompiler program like JD-GUI to inspect which objects are causing trouble, then load the jar assembly.


The first thing you will see is the namespaces composed. Let's start by detecting and fixing those errors.

1.  The type or namespace 'IUserAuthentication' does not exist in the namespace (Org.Jivesoftware.Smack)

Let's use reflection and navigate until that we get to that namespace.


 


Did you realize that there is no IUserAuthentication interface? That’s because C# linking uses conventions for the interfaces by adding the letter “I” at the beginning. So we need to specify in Metadata.xml file which is the correct name of the interface.

public

Note that you have to specify the original name of the assembly. Sometimes you can deduce it but in another time wouldn’t work that way. 

2. Inconsistent accessibility: base class 'Org.Jivesoftware.Smack.Util.Collections.AbstractHashedMap.EntrySet' is less accessible than class 'Org.Jivesoftware.Smack.Util.Collections.AbstractReferenceMap.ReferenceEntrySet'

When we talk about accessibility, we refer to modifiers. Change these classes to visibility public

    public-->    public    public    public    public    public    public

3. Now, if we build the solution we're going to receive more errors.


We might continue solving these errors. But as you notice, more errors are appearing than we are fixing. You could end up fixing more than 1000 issues. “Hey Xamarin, are you out of your mind?” maybe if you read very well the purposes of Transforms folders, I add this one: To customize the API design by changing names or types, by removing unused pieces, etc.


So I recommend just using those API’s or functions you do need in your project. So you can omit removing namespaces in the binding library and of course they will be there but you cannot access them.


Reviewing the documentation of the library in the project, we really need the namespace org.jivesoftware.smack to create a socket communication for the chat. Then, we can remove the namespace that we do not need.

                                                        

4. Now, we build again


We only see only one error inside of the namespace we're interested in.


'Org.Xmlpull.Mxp1.MXParser' does not implement interface member 'Org.XmlPull.V1.IXmlPullParser.EventType'. 'Org.Xmlpull.Mxp1.MXParser.EventType' cannot implement 'Org.XmlPull.V1.IXmlPullParser.EventType' because it does not have the matching return type of 'Org.XmlPull.V1.XmlPullParserNode'.

        Org.XmlPull.V1.XmlPullParserNode     

5. At the end, we will get more errors but just a few of them. The result is this.


Now, build the project and you’re ready to consume the data on an Android Project.


Create your target project to consume the assembly and tap contextual menu on Referencesfolder. Click Edit References and check it.


 


Now, try to access one class of the assembly in the activity.


 


You’ll see it is available to utilize the logic into your target project.


I know it can get tedious to see so many errors the first time. But at the end it is more reliable by utilizing third party libraries which use standards and have been tested by many users or when there's no .NET assembly to consume directly in your project.


Happy Decompiling :)


Oscar Fimbres is a Computer Science student. He has been involved in ASP.NET MVC and Windows RT projects. He currently works as Xamarin Mobile Developer at iTexico. Also he is a Microsoft Student Partner since 2011 spreading the word about Microsoft Technologies.


Contact Us


View the original article here

How To: Time Management in Software Development and Project Management

Initially, time management referred to just business or work activities.  However, the term has broadened to include personal activities as well. The definition of time management is “the process of planning and exercising conscious control over the amount of time spent on specific activities, especially to increase, effectiveness, efficiency, or productivity.” -Stephen Covey


 


During my experience in software development, I have come across some issues that can be considered like the red light of software project management.

Unrealistic project goalsBadly defined system requirementsPoor reporting of the project's statusPoor communication between customers, software developers and project managers and stakeholders.Inability to handle the project's complexitySloppy development practicesPoor software project managementCommercial pressuresInaccurate time estimationManagement time and activities 

I would like to focus this post on time management, activities, and what are the best practices to take advantage of our time. Recently, I started thinking about how many things we do every day that have the same results, both at work and in our personal lives. Here, I would like to share my understandings and what my choices are while making the best use of my time.


1. Planning & prioritizing
2. Protect your time and avoid needless distractions
3. Discipline yourself.


According to the old saying, “A stitch in time saves nine”, time management strategies are often associated with the recommendation to set personal or team goals. A timely effort focused on planning tasks will prevent more work later.


For individual tasks or goals, an importance rating must be established as well as for deadlines and priorities assigned. This process results in a plan with a task list or a schedule or calendar of daily, weekly, and monthly activities or even customized periods.


Planning and prioritizing helps us to prevent losing any task we have to do.  Additionally, this also makes sure that we do the most important ones first. I want to share the Stephen Covey Matrix which can help you think about your priorities, and determine which of your activities are important, and which distractions are essential.


Use your time effectively, not just efficiently.


 


Distraction is the major time killer that makes us ineffective.


With innumerable distractions these days, it is very easy to be taken hold by any one of them and lose sight of all that should have stayed as a priority. Many developers will not code for 8 hours straight. Some developers say that distractions are often caused by a lack of motivation. Obviously, developers must be motivated enough (usually in some form of profit sharing) in order to do their best work, but it is wrong to assume that distractions are unethical to do good work.


In fact, some developers said that their best work comes from not thinking about a problem for a while and returning to it after being appropriately distracted. In other words, it means to get away from a problem and think about something else.


Developers frequently distract themselves when they are investigating a problem, because they finish everything on a web page that is not related to the main problem. So, get focused!


Here are some helpful hints to become more focused for everyday tasks.


- Discipline yourself to know when it is time to work and when it is time to play.


Get the proper amount of sleep and try to avoid stress.


- Inform friends and family who may try to contact you that you need some peace and quiet to complete some work and shouldn't be disturbed.


- Think ahead as to what could be a distraction and try to distance yourself from it. For example, Social media, chats, a lot of noise, and web browsing that is not related.  


Planning is the starting point of time management, while identifying risks that are retrospective. Sometimes it is even more important than the planning. That is because planning is working on something uncertain, while retrospect is based on reality and intended to make improvement.  So, how do we identify distractions? Track the time and see where your time is being spent the most. Our memory is unreliable to keep track of how long we spend time on the things to be done. We need to actually write it down and write it down when it happens (at the beginning or the end of the task).


Jessica Ayala has a Bachelor in Psychology specialized in Corporate Psychology with professional experience in recruiting. She currently works at iTexico as Human Resources Analyst. You can contact her at her email: jayala@itexico.com, LinkedIn profile or Twitter account.

Contact Us

View the original article here

iTexico Top 5 Mobile Development Stories. November 2013 Edition

The end of 2013 is near and looking back we’ve had some great announcements and releases during the whole year. From Apple we saw the announcements of the new mobile operating system iOS 7 and its new user interface, the much expected iPhone 5S, the super light iPad Air, among other things. In the other hand, Google kept Android app developers very busy as well with things like the Nexus series for tablets and phones, the announcement of Android 4.4 Kit Kat and Samsung releasing the newest versions of its smartphones.



Wearable Tech was very trendy too with all those smartwatches making the news such as the Pebble, Samsung Galaxy Gear, even an ongoing rumor about the "iWatch" and, of course, the controversial Google Glass that has captured the attention of many users and early adopters having fun with it.


So as you seen, lots of things going on. But what is left for the last quarter of 2013? Well here are the latest stories in the industry, let's start.


There were a lot of rumors and videos about the flexible OLED attempting to make a trend in the future of smartphones. Now LG announces the first “real” curved smartphone, which includes all the promised features of a curved smartphone such as unlocking the device and taking a quick look to see messages.


The new LG G Flex smartphone’s main feature is not only the curved screen but also that it is the first “self-healing smartphone” That’s right, it heals from scratches, kind of.


In the link you can see a YouTube video where device is put through a test, from a scratch with the keys to a cut with a knife! The results are amazing and makes you wonder how many things can be built with that kind of material.


Peter Traeg, of Smashing Magazine, brings us a series of tutorials to build mobile applications in four different ways: Native iOS, Native Android, PhoneGap and Appcelerator Titanium. In this first part he discusses the Native iOS development.


As an excellent opportunity to broaden your scope as a mobile developer, as the author says, it’s not about converting into a particularly technology but to provide some insight into how applications are created in different technologies.


In this segment you can see the basics of iOS development and how a project is created in XCode, Storyboards, objective C test and more.


Now you can have the blueprints for a do-it-yourself phone where all software and hardware details are provided through GitHub.


The cellphone is a basic GMS service where you can make calls, send text messages, store names and it can be made by you in many variants. An interesting hobby for those who are into the technology and can help younger generations to understand the functionality of the common day objects.  Just like solving math problems and computer language coding, it helps young eager minds solve complex problems.


You can find the complete project, owned by David A. Mellis, order parts, software and instructions on his webpage to create a cellphone that is completely made by you.


2014 is just around the corner and we had a lot of news buzzing this year.  In the beginning of this year we talked about curved phones, Apple releasing TouchID, the growing adoption of smart TVs, the release of Xbox one and so on. As you can see the trends were very different at the beginning of 2013. So what can we expect from the upcoming year??


Jayson DeMers from Forbes.com explains the most possible trends for next year. Smart TV as a basic device for the families and upgraded interaction with smartphones are just a few. Smart watches and other smart gears will get smarter indeed. A forecast about google glasses is waiting on standby with the release of the version 2.0 and more.


Let’s not forget that Amazon is attempting to make delivery by using drones and the growing community of 3D printing. More and more start up projects are arising and, I don’t know about you, but I’m excited to see what is coming in the near future.


With the surprise announcement of the new Android OS’s name and its promised new features, the Android community is impatient to get the new update on their phones. The new features has been appearing slowly on the web and until the official release date is announced we can do nothing but wait eagerly.


Google Nexus 5 will come with Android 4.4, while Samsung Galaxy S4 and HTC One will be available for upgrades. More devices will be announced. Meanwhile see a preview of the top features for Android Kit Kat by IBNLive.

Alfonso Banuelos is a Marketing Associate at iTexico. He holds a Bachelor in Marketing and a Diploma in Marketing and Sales Strategies by the University of Guadalajara. Additionally, he is one of the main voices driving iTexico's Social Media updates and communications.

Contact Us

View the original article here

Xamarin Mobile App Development. Training App Developers in Mexico!

C# (C Sharp) is a programming language that has been around for more than a decade and is already the foundation for so many products and software used by every one of us on a daily basis. Microsoft created this simple, yet elegant language as a part of their .NET initiative a while back and it has grown to become immensely popular within the developer community and has taken desktop app development industry by a storm.

However, we live in an era where mobile computing and user experience is king and where consumers have a massive set of alternatives to chose from when it comes to mobile applications.  In a world where the paradigm of desktop apps no longer apply to reality, how can C# and .NET developers leverage their existing knowledge and experience? Meet Xamarin, a way to build native mobile applications using C# and .NET capabilities.


Since the introduction of the modern smartphone and the mobile application ecosystem, developers have created dazzling applications using a wide variety of programming languages.  They are using native ones like Objective C for iOS or Java for Android, or using cross-platform development tools and platforms to create native mobile applications. If there is one thing that C# has not been a major player in until very recently, it is in mobile app development. Enter Xamarin, a cross-platform technology built by the makers or Mono and aimed to create fully native mobile applications using one of the most popular language of all time: C#.

Xamarin basically allows developers take advantage of powerful language features like Linq, Lambda expressions, Async programming, reflection and dependency injection as well as many other great things like:

- Reuse existing C# code from existing applications.

- Use Visual Studio as IDE with its famous extensions like Resharper.

- Native access to the platform libraries (Android, iOS).

- Code sharing between mobile apps.

- Use Xamarin components to share camera, and social networks code between platforms

- Use native libraries with bindings.

Among other things, Xamarin is a great tool to integrate the business logic of all the mobile clients in one common point as well as extend your Microsoft stack to mobile devices using your current capabilities. It also integrates current native efforts for Xamarin projects and many other possibilities for .NET developers using Xamarin. At iTexico, we are still discovering new things that we can use Xamarin for in our every day projects, I recommend check it out!

iTexico has always been looking to become partners with the most innovative leading companies in the technology industry. As a part of those efforts, Xamarin and iTexico have become close partners and worked on a variety of projects in the mobile development area. A key part of that partnership is finding the best ways to make sure that the level of expertise in the Xamarin platform is the best. This is why both iTexico and Xamarin planned a joint effort to train and engage with the developer community in Mexico, Xamarin founder’s home country and the land where iTexico’s Global Delivery Center is located.

On October 24th 2013, we were visited by the Xamarin team of  Matt Larson, Partner Manager at Xamarin and Anuj Bhatia, a Xamarin trainer. They arrived in Guadalajara where they were set up to meet and engage with the talented developer community in Mexico’s western region.

During their 3-day stay, the team at iTexico and our special guests had the opportunity to hold several events such as business lunch and learn sessions, community drink-Up and of course, Xamarin’s first official certification class in Mexico. More than 30 developers attended to a sold-out class where they had the opportunity to discuss about their experience using Xamarin, learn new topics and reinforce their existing knowledge in the platform. At the end, students were given access to the Xamarin Certified Mobile Developer certification exam. Everyone was very excited!

It was a very rewarding experience and the community really appreciated the opportunity to get trained, share their knowledge and talk about all things mobile during those days when C# became a shining light in the new era of mobile development.

If you’re interested in learning more about Xamarin or about our cross-platform mobile development services make sure to give us a shout!

- Business Lunch & Learn


- Training


- Drink Up



David Sandoval is the Marketing Manager at iTexico, entrepreneur, and UX/UI designer with more than 7 years of experience in web application and mobile app design, usability and product design. He holds a Bachelor in Information Systems and an MBA in Marketing by La Trobe University in Melbourne, Australia.


Contact Us


View the original article here

Intro Android Mobile Development: Open Source Computer Vision Library

The following information, and code example was obtained from the following from http://opencv.org/. If you are not familiar with OpenCV and want to learn more, please visit the link. All steps were made using MAC OS 10.7.4


OpenCV (Open Source Computer Vision Library) is an open source computer vision, and machine learning software library. OpenCV was built to provide a common infrastructure for computer vision applications and to accelerate the use of machine perception in the commercial products.


The library has more than 2500 optimized algorithms, which includes a comprehensive set of both classic and state-of-the-art computer vision, and machine learning algorithms. These algorithms can be used to detect and recognize faces, identify objects, classify human actions in videos, track camera movements, track moving objects, extract 3D models of objects, produce 3D point clouds from stereo cameras, stitch images together to produce a high resolution image of an entire scene, find similar images from an image database, remove red eyes from images taken using flash, follow eye movements, recognize scenery and establish markers to overlay it with augmented reality, etc. The library is used extensively in companies, research groups, and by governmental research projects.


Well-established companies like Google, Yahoo, Microsoft, Intel, IBM, Sony, Honda, Toyota use the library. There are many startups such as Applied Minds, VideoSurf, and Zeitera, that make extensive use of OpenCV. OpenCV’s deployed uses span the range from stitching streetview images together, detecting intrusions in surveillance video in Israel, monitoring mine equipment in China, helping robots navigate and pick up objects at Willow Garage, detection of swimming pool drowning accidents in Europe, running interactive art in Spain and New York, checking runways for debris in Turkey, inspecting labels on products in factories around the world on to rapid face detection in Japan.


It has C++, C, Python and Java interfaces and supports Windows, Linux, Android, and Mac OS. OpenCV leans mostly towards real-time vision.  OpenCV is written natively in C++ .  OpenCV runs on both desktop (Windows, Linux, Android, MacOS) ,and mobile (Android, Maemo,  iOS).


To start working with one example about face detection using OpenCV in Android you must already have installed, and configured Android Developer Tools, and the Android NDK.


Please visit the following link to download ADT, and NDK. Afterwards, you can continue with the next steps.


OpenCV Documentation


1) Download OpenCV for Android 2.4.6 


2)  Unzip, and import the OpenCV Library, and the OpenCV Sample – face-detection


 


3) Go to the OpenCV Sample –face-detection properties project, and go to the android section, and check if you have the OpenCV Library added.


 


4) Go to C/C++ Build section, and check the ndk-build path


 


5) Go to the Java Build Path section, and then Libraries tab. If you open the Android Dependencies, and you did not find the opencv library – 2.4.6.jar you will need to add the library manually on the add external jars button.


6) Go to the ADT menu, and then select Preferences, Android, NDK to select the path of the NDK location.


7) Open the terminal, and type the following line of code to open the bash profile, and verify you have the following paths in your bash profile.


 


9) Download to your device OpenCV Manager from Google play


8) Run OpenCV Sample – face-detection from the ADT and enjoy.


I have learned how to use the OpenCV Library with Android. It’s a good library to implement other functionalities like detect colors, shapes, to do manipulations of images, etc. What I noticed running the OpenCV Sample – face-detection is that the application is not working a 100%, but the majority of cases the application does detect faces.


The picture above is the OpenCV Sample – face-detection application running. On the right is our CEO, Anurag Kumar!


Francisco Antonio Duran is a computer science engineer. He is currently studying a master degree about Internet Technologies, and an Informatics Security specialization in the Universidad Autónoma de Guadalajara. He works as mobile developer, and mobile instructor in iTexico. 


Contact Us


View the original article here

Xamarin Mobile Development: Consuming Java Libraries from C# in Xamarin.Android - Part 1

Third-party libraries are great! They cut down on the development time significantly by allowing developers to not worry about building certain things, like a custom UI control or client service.


The Java ecosystem includes a diverse and immense collection of components. However, this isn’t a deal breaker, many of these components can be used to reduce the time it takes to develop an Android mobile application.


So I’ll introduce you an overview of some of the ways that developers can use these existing Java components to improve their Android mobile app experience with Xamarin Studio creating binding projects.


One important distinction to be made is that it may be in your best interest to convert a particular library to C# and Xamarin.Android, rather than bind it. There are certain advantages to each approach, as well as particular circumstances when each technique is particularly useful!


Binding:

-Little to no Java knowledge-Quick and straightforward-Less customization

Converting:

-Java knowledge-Tedious-More customization

Sometimes in larger libraries, things can get complicated really quickly, converting it is harder and it’s required to have an extensive knowledge of how does the library work. In these cases, it would be more convenient to focus on binding instead on converting, it can be done in little time, and especially because the process is pretty reproducible once you get it down. 


A binding is just a simply wrapper class (known as a Managed Callable Wrapper), which allows a .NET application to interop with non-.NET technology; in other words, to reproduce libraries in C# in a minimal amount of time without really any Java knowledge. In this case, it allows a Xamarin.Android mobile application to call a Java class or interface from C#. 


This technique is an automated, declarative approach to binding Java libraries. It involves using either Xamarin Studio or a Visual Studio project type that is provided by Xamarin.Android: the Java Bindings Library. You only have to include a .java and .jar code within your app. To successfully create these bindings, a Java Bindings Library may still require some manual modifications.


You need to have in mind which classes or interfaces you’ll need to use in your mobile application. Sometimes the compiler might have trouble binding it and you have to fix like thousand errors (in you plan to convert a whole complex library, of course) So my recommendation is just bind those libraries that you really need.


Maybe the owner of the library does not provide documentation of the java classes, so you can use this helpful tool called JD-GUI, which is a Java Decompiler and you can download it from here: http://bit.ly/1alkUOW


As I said lastly, to successfully binding may still require some manual modifications. For example, there’s a confliction between System.Object and Java.Lang.Object namespaces, the .NET conventions are a quite different from Java conversions (interfaces start with “i”, PascalCased members, etc.) and make public those classes, methods, field access you’re going to need.


Before getting startet imagine that you have to implement a chat using a protocol like XMPP which is only available for Java. Smack is the name of a complex Java library which implements standards of XMPP created by Ignition and is your only reliable resource on internet.


So, you can download it from here: http://bit.ly/1jqsbPt


Ok, so we are ready to start coding and see how can we make the development faster. In the next part we will create an Android Java Binding project from scratch.


Feel free to leave any coments and keep tuned for the next part!


Oscar Fimbres is a Computer Science student. He has been involved in ASP.NET MVC and Windows RT projects. He currently works as Xamarin Mobile Developer at iTexico. Also he is a Microsoft Student Partner since 2011 spreading the word about Microsoft Technologies in his student life. 


Contact Us


View the original article here

Developer's Perspective: IBM Worklight for Mobile App Development

As a mobile app developer and interested in new platforms and techniques of development, I will share with you this technology, IBM Worklight to create mobile apps:



Worklight is an open, comprehensive and advanced mobile application platform and framework used to develop HTML5, hybrid and native mobile applications.  Worklight also helps run and manage these software mobile applications.  


IBM Worklight framework is made up of these four main components:

IBM Worklight Studio.IBM Worklight Device Runtime Components.IBM Worklight Server.IBM Worklight Console.

Each one of these components allow us to manage some part of the application:

This is a plugin for Eclipse IDE that allows us to develop the code for the app.

All of these components are the SDK. This will make the code we write to work on the user's real devices.


This is the server that provides the information to the application, based on adapters’ paradigm. It gets the data access to the back-end of the app.


This is the monitor and manager of the app in its different versions and environments, adapters and push notification rules.

Provides the API that allows local JSON data storing.


An adapter is a component that is used to retrieve the data from services in the back-end server. The retrieved data by the adapter is always JSON formatted.


An adapter is composed of:

An XML file describing the back-end server information and the procedures that it performs.A JavaScript (.js) file that contains the implementation of the procedures already declared in the XML file.An XSL file, if the retrieved data from the back-end server is in XML format, the XSL file is used for the XML to JSON conversion.

The adapter can be used to make HTTP requests, execute SQL queries and more.


There are some JavaScript libraries that help with the app development.

JQuery Mobile.Dojo mobile.Sencha.

Also, the Apache Cordova Framework can help when creating mobile applications with Worklight. This framework allows the app to call native device functions from JavaScript, and even lets you create your own Cordova Plugins with Objective-C code.


Ok, let us leave the theory behind for a while…


First, you have to download and install the IDE called Eclipse.  Warning! The Worklight documentation does not demand very specific version of the IDE in every version of the eclipse.  By the time this blog is published, IBM Worklight 6 will be the latest release and it will demand Eclipse Juno v4.2.2 (SR2) or Eclipse Classic v4.2.2. You can download it the latest release here. 


The next step is to download the IBM Worklight Developer Edition Plugin from the Eclipse Marketplace. 


NOTE: You should not forget to install the SDK of each environment in which you want to deploy.


Once everything needed is correctly installed, create a new mobile app project:


Select Hybrid Application and Next:



Now, set the Application Name. If it is needed, add one of the JavaScript libraries listed:


As you can see in the screenshot, the dojo library comes with the IBM Worklight 6 Plugin.  NOTE: We will NOT add any library for this example.



Now, you can see the basic project structure

Adapters: Source code for the adapters.Apps: Source code for the apps.Server: Configuration files, libraries and Java code for the server.Components: Source code for the Shell components.

In the apps?WorklightApp?application-descriptor.xml file is where you can add environments and features to your app.  In this example, we'll add iPhone* and android environments.


*Note: iPhone or iPad, only if you have a Mac.

Select Application “WorklightApp”.Click on Add… Button.Select the environment.Click OK Button.


There are new folders under apps?WorklightApp folder, one by each environment you have added one as a common resource.


In the WorklightApp.html file that’s inside the common folder, add a button after the application UI comment:


Now inside each environment (iPhone & android folders), in the js?WorklightApp.js file, add an event listener for the click event of the button after the Environment initialization comment:

// Environment initialization code goes heredocument.getElementById("helloBtn").addEventListener('click', function(){            alert("from ");}, null);To see the results go to the Project Explorer and select your WorklightApp folder, right-click on it, select Run as option and then Build All and Deploy



Now, in your workspace you can see a new Project (an Android App Project) named WorklightExampleWorklightAppAndroid. This is the result of the deployment for Android, selecting and running it as an Android Application will compile the app and load it into an emulator or a device.



In the case of iPhone, Worklight will also create an Xcode Project for you. To open it, you must go to the iPhone environment folder inside your Worklight Project, right click on it and run it as Xcode Project, and then you can run the app from Xcode IDE.





Adalberto Gonzalez is an experienced Systems Engineer which currently works at iTexico as a Mobile Developer. Adalberto has been specializing in Worklight since early 2013 additional to the regular platforms for development.


Contact Us


View the original article here

Mobile App Development: Working With Media Files on Android (Part 2)

In the previous blog post, we presented two solutions that work with media files on the Android Mobile App platform, especially videos files. In this post, I will present a guide for merging and trimming video files using MP4parser. All source codes can be found on GitHub. 


Preliminaries


The first thing that we must do before we start programing our mobile app is to download the mp4parser libraries from the project page right here. For this example, we will need ISOViewer and ISOParser, which is provided in the URL mentioned above.


Secondly, we will need to create a new project and add the libraries to the project.  At the end, the project libraries must look like this:


Merging video files


The first code example that we will be working with is to merge video files. We must remember that working with media files types is an exhaustive job.  We must implement all our classes in a separate thread so that we can leave the main visual application unfrozen.


Let’s start with our class skeleton. Create a new class for our mobile app projet called MergeVideos extending the superclass AsycTask.  After creating the class, we can add the variables, constructor and required methods as follows:


 


As you can see our class must be initialized with 2 values, the working path folder and the list containing the video names, including the extension (e.g. video1.mp4, video2.mp4, videoN.mp4). The next step is to write the logic in charge of the video merging task. For this, we must follow the next algorithm:

1. For each video file we must create a Movie object containing all the information as video and audio tracks of such video.
2. For each video object, we must:
     a) Get every video track and stack them in a list.
     b) Get every sound track and stack them in a list.
3. Create a new Movie placeholder and add the movie and audio tracks stacked previously.
4. Write the new Movie object to disk, thus creating the new merged video.

So following the previous algorithm, the first task is performed by the following snippet:


 


Where count, is the number of videos to merge and inMovies is the array of Movie objects. The “for” loop will get all the video files references, generating the Movie objects and adding it to the array.


The next step is to read and concatenate the sound and video tracks, which is done by the following code:


 


After concatenating every video and audio track, we are ready to create the new movie placeholder for our mobile Android app using the snippet:


 


At this point, our new movie is created in a logical manner.   Now, we must write this newly created movie into the nonvolatile memory, which can be done as follows:


 


And now our newly created merged video is ready to be reproduced!


Trimming video files


The next example is how to use this library to shorten the length of a given video. Like the previous example, all of the logic code must run on a separate thread, in order to keep the activity unlocked. The class skeleton should look like this:


 


The class is initialized with mediaPath which is the complete path to the video.  The startTime, which is the start time in seconds, and length, which is the number of seconds it takes to trim the video file after the start time. In this case, all the logic is contained in the trimVideo method.   So let us start with the logic algorithm:

1. For each track in the video, get the correct start time from all the tracks, since where are using mp4 files, this is a required process in order to trim the complete video.
2. For each track in the video, crop the track with a start and end sample time and add it to a new Movie object.
3. Write the newly created movie to the disk.

Following this algorithm, the first step can be performed by the following code:


 


In this case, the snippet is using a private function called correctTimeNoTextSyncSample to get the nearest synchronized sample to our desired start time. Afterwards, we are ready to crop each track of the video and the step 2 of our algorithm can be performed as follows:


 


After getting the correct start and end time sample from current track, we are ready to crop it and add it to the final movie object. After cropping each track of the mp4 file and concatenated it, we are ready to save the Movie object to disk.  This step can be performed by:


 


And that’s it. We now have a newly cropped video created from a larger one!


Final thoughts


As mentioned in the previous post, one of the main drawbacks of this library is that it can only work with MP4 files. Luckily for us, all android devices record video files in such format, so this is a good option when working with this kind of media. However, this library does not give support to transcode and/or compress media files, which in many cases, is an important task to do before uploading media files to the cloud.  In this case our best option is to use ffmpeg which is our next topic of discussion. Till next time!


Acknowledgments


*Thanks to the mp4parser project for keeping this excellent library ().


*All codes were based on the demos provided by the library web page.


*More about the mp4 format here. 

Victor Cervantes is an Android developer with 1+ years of experience with the Android mobile platform. He has a Masters Degree in Computer Science specializing in optimization problem solving. He is an Appcelerator Titanium Certified Developer (TCD) and currently works at iTexico as an Android Developer.

Contact Us


View the original article here

Tutorial - Android Mobile Development: List View and Memory Resources

Android provides us a powerful way to create lists views.  Just like Facebook or the popular Vine mobile app, Android allows us to show the posts/feeds in list view. I’ll give you a few tips that can be really useful when it comes to the memory consumption management subject for android mobile apps.


 


We are going to make some assumptions. First, we already have a layout with a list view in it: 


 


Secondly, we also have a reference to our list view in our list view activity:

ListView myListView = (ListView) findViewById(R.id.myListView);

Ok, let's create a custom layout for each row of our list view. Let's say that we want to create a list view with two text views and one check box in each row.  So in a new xml file (row.xml), I’ll add the three objects like this:


 


Now, we can start creating our list adapter which will help us manage the resources in a really optimized way to create our list view.


First of all, let's explain what the main parts of an adapter are. For this example, I will talk about the Base Adapter, which contains the followings methods:


getCount():


Return how many items are in the data set represented by this adapter.


getItem():


Get the data item associated with the specified position in the data set.


getItemId():


Get the row id associated with the specified position in the list.


getView():


Get a View that displays the data at the specified position in the data set


We need to create a new java file which extends from base adapter and will override the previous methods.


 


From our main activity, we will create a list adapter which receives an array in its constructor and that array contains the information we want to see in our list view:


As we can see in the previous image, I created a class which will manage two strings (the stadium and the football team).  In this example, I just added one stadium but you can add as many as you want. After having the array ready, I created the list adapter and set it to list view.


We can start painting the list view and here is where the optimized list view starts.


As soon as we set the adapter to the list view, the getCount method from our list adapter will be called to return the number of elements the list view has. In my example, this is how the getCount method will look:

@Override
public int getCount() {
return stadiumsList.size();
}

By doing this, we can ensure that the list view will have n-rows depending on the array size and the getView method will be called the integer getCount method returns.


Let’s see what getView method is for and how we can adapt it to be optimized. There are two things for Android which are lengthy and time consuming that we must avoid doing this too many times:

     *Inflating layouts
     *Making references to layout objects

The getView method gives us the following objects: 

public View getView(int position, View convertView, ViewGroup parent)

For this example, we will use the position and convertView objects. As the name says, the position value tells us which row is going to be painted in the list view and the convertView object gives us a recycled object that has already been painted and we can reuse or just use a null object if we didn’t already paint a row.


Here is our first hint to optimize our code.  If we get a convertView which has a recycled object, we do not need to inflate any layouts anymore.  This is an action that we must avoid doing several times. To accomplish this action, our code should look like this:


 


How will the previous code help us optimize our application? In a scenario where we can have 100+ list items to show, Android will only load the items that can fit on the screen. Let's say 6 for example, so the getView method will only be called 6 times. Each time with a convertView value as null.


When we start scrolling to see the 7th item, the getView method will be called again with a convertView value as null.  This is because we are still able to see some part of the first element of the list view and we don't have any recycled items.


The optimization starts when the 8th item is going to be painted. By this time the first element won’t be visible anymore, we are going to have a recycled layout.   We have to use this because the layout is out of bounds on the screen. The convertView for this element won't be null, so we can managed to reuse it and save time and resources by avoiding inflating a new layout.


How to make a reference to each object in my row.xml file? This is the second part we have to be careful about how we manage these references.  So let's review the following code:


 


First, I created a ListAdapterHolder class which will contain the objects I have in my row.xml file and by using the previous convertView logic, I will make a reference to my layout objects only if convertView is null.  Otherwise it will mean that I already did it. To reuse the recycle references, I will have to store them in the convertView tag property by doing a setTag call and to have them back by doing a getTag call.


Finally, we have to manage our array to extract the string we need and set the text to our holder objects to get the following result:


 


NOTE: This note can save you hours of desperation when creating this kind of views.  Remember how we added the List View in our xml? Both width and height are configured as fill patent. Never use wrap_content because it will cause multiple calls to getView method when painting your List View. Android will repaint the List View every time getView is called (It will need to repaint it because its content has change and as wrap_content is set, it dynamically adapts its width and height).


Abraham Vargas is a Software Developer with more than 2 years of experience in mobile development. He is an Appcelerator Titanium Certified Developer (TCD) and currently works at iTexico as an Android Developer.


Contact Us


View the original article here

Mobile App Development: Top 5 Tips to Upgrade Your App to iOS 7

iOS 7, Apple's latest operating system for iOS devices, introduced quite a few changes to the user interface that can make mobile app developers go crazy when trying to support iOS7 without having to completely re-examine the code. Some changes are so obvious to the user that require immedaite attention from the mobile developer. For instance, all iOS 7 apps are now full screen, meaning that their window gets overlapped by the status bar (the bar holding your clock, wifi status, etc). While Apple has made it relatively easy to convert apps to the new version of iOS, there may be situations where it's not that easy to convert or adapt the UI of your app. Here are 5 quick tips and tricks that will help you with this endeavor.


If you want to have less headaches when adding support to iOS 7, you should really stop supporting the older versions of iOS 5 and below.


Those older versions of iOS have many changes to the API which would make your code difficult to maintain.


So first move all your code to support iOS 6 and then you can start by adding support for iOS 7. Also, when it comes to the UI, iOS 6 has a technology that is not available in older versions.


Besides, all devices that supported iOS 4 and iOS 5 also support version 6. And it's a free update for iPhone, iPad and iPod touch so there is no point to keep supporting the older versions. 


I am a big fan of this technology. Before iOS 6, we had what Apple called the springs and struts. These were good but would cause problems when your layout had to change. For instance when you added a new language to your app, chances were that the label was too small and then you had to resort to coding to fix that.


Actually, many developers preferred to do their layouts by coding, which resulted in all kinds of bugs that were difficult to resolve.


With Auto Layout this becomes a thing of the past. You basically just set a few rules (called constraints) and the system takes care of rest.


This is not saying that you can't use coding. In some cases you even need to make your layout by coding. But instead of telling your UI elements where they should be positioned, you are telling them how they should behave with the other UI elements.


You can even use Auto Layout to animate your UI by adding or removing constraints. And when it comes to supporting iOS 7, you really don't need to do much to your UI to have it look like before.


For more information about Auto Layout I encourage you to read this page: https://developer.apple.com/library/ios/documentation/userexperience/conceptual/AutolayoutPG/Introduction/Introduction.html


As you know, all iOS 7 mobile apps have one thing in common; their window is now full screen. This means that the status bar is now overlapping the app. But what if you don't want this behavior?


Fortunately there is a solution to this. In iOS 7, UIViewController has a method called edgesForExtendedLayout and you use it by writing this code:

if ([self respondsToSelector:@selector(setEdgesForExtendedLayout:)]) { // check is iOS supports this                self.edgesForExtendedLayout = UIRectEdgeNone;}

By doing this, you prevent the window to go under the status bar. Easy one liner which will save you lots of trouble!


 


You may be tempted to just create UINavigationBar either programmatically or using Interface Builder and add it to your view controller's view. Please DON'T!


Instead wrap your view controller in a UINavigationController and let the system create a navigation bar for you. This will make it look better in iOS 7. On iOS 6 you won't see any difference.


Use this method even if your view controller won't be used for navigating between other view controllers. It's a good practice!


 


This tip is not specific to iOS 7, but it will help you have a standard UI on both iOS 6 and 7.


Almost all UI elements in your mobile app have an "appearance" proxy which you can use to change how a UI element looks. Things like title color, background color, font, etc… can all be changed (depending on the element).


This is useful if you want your iOS 6 mobile app look the same on iOS 7 or vice versa.


You should really take a look into this, it's really useful.


Adapting your mobile app to iOS 7 is really not that hard. There are just a few things that you need to take care of but in general it should be pretty fast to get your app up and running on Apple's new version of iOS.


I hope you found these tips useful, although I'm sure I'm missing a few.  In that case please share it with us.


Until next time!


Jesus De Meyer has a Bachelor's degree in Multimedia and Communication Technology from the PIH University in Kortrijk, Belgium.  He has 15 years of experience developing software applications for Mac and more than 5 years in iOS mobile app development. He currently works at iTexico as an iOS Mobile App Developer and in his spare time he works on his own mobile apps.


 


View the original article here

Web Development: Using RVM to Manage Multiple Environments of Ruby

Once we decide to learn a new programming language, framework, etc., one of the principal questions is: how can I install it? After a few days, we realize that there are many different versions. Normally, we always want to install the latest version in order to learn the most recently approaches. However, we'll sometimes have to set up different versions for many different reasons such as compatibility with others components, libraries, API's, etc. Our first question changes from “How can I install it?” to “How can I set up many different versions?” In this mini tutorial, I'm going to show you how we can set up different versions of ruby using RVM for web development, so let's get started.


 


What is RVM?


According to its website, RVM is a command-line tool which allows you to easily install, manage and work with multiple ruby environments from interpreters to sets of gems. It’s basically that!


There are three ways to install and configure RVM:


          1- Single-user


          2 -Multi-User


          3- Mixed Mode


In this mini-tutorial, we'll only cover the Single-user installation. If you want to learn more of how to install RVM using other ways, you can look at the documentation in the link here.


1.- First, you need to have GIT and curl installed, then download and run the RVM installation script, in a terminal, type this command: user$ \curl -L https://get.rvm.io | bash -s stable


Here, we're using curl to download the script and runs the script in a bash shell (we're installing the stable release version of rvm).


2.- RVM needs to be load into our shell session as a function.  In Single-user installations, RVM function is automatically configured for every user on the system. So in this step, we don't do nothing.


3.- Close out your current terminal or run the following command in order to reload the session: 


user$ source ~/.rvm/scripts/rvm

itexico@itexico-virtualbox:~$ source ~/.rvm/scripts/rvm
itexico@itexico-virtualbox:~$ 

4.- Finally, we can test the installation whit the following command: user$ type rvm | head -n 1

itexico@itexico-virtualbox:~$ source ~/.rvm/scripts/rvm
itexico@itexico-virtualbox:~$ type rvm | head -n 1
rvm is a function
itexico@itexico-virtualbox:~$

If all is right, we should see the output "rvm is a function"


Using RVM to set up different environments of Ruby


Some basic commands:

user$ rvm list => List all version of rubies installeduser$ rvm use version_ruby  => To use a specific version of rubyuser$ rvm gemset list all => List all gem setsuser$ rvm gemset create gemset_name => To create a gemsetuser$ rvm gemset use gemset_name => To use an specific gemset

Ok, let's run the following command: user$ rvm list


We'll get something like this:


 


That means we don't have any version of ruby installed yet.


1.- Install a new version of ruby:


To install a new version of ruby, we only need to run this command: user$ rvm install 1.9.3

itexico@itexico-virtualbox:~$ rvm install 1.9.3

 


With this command, we're telling RVM to install ruby version 1.9.3 easy, isn’t it? (The same process to install any different version of ruby)


If we want be sure that the version 1.9.3 of ruby was installed, we can run the RVM command to list all versions of ruby installed: user$ rvm list


 


We should see our new version installed


2.- Use an specific version of ruby:


In order to show you how is possible to switch between different versions of ruby, I have installed another version of ruby (1.8.7). It was installed just like we did in the before step (with the version 1.9.3). This means that now I have two versions of ruby installed and when I run the command: user$ rvm list


We see something like this:


 


Now if we run the ruby -v command to see what version of ruby we're using, we will get an error like this:


 


Why is this error? This is because we have not told RVM which version we will use, so, to use a specific version we only need to run this command: user$ rvm use 1.9.3


With this command, we're telling RVM to use the version 1.9.3 of ruby. Now if we run the command to list the versions of ruby installed (rvm list), we should see something like this:


Notice that now the version that we're using has a mark ( => ), as you can see in the image, this mark means "current" and there are another marks =*(current and default) and * (default), you can look at the documentation at RVM site to see how you can tell RVM to set a default version.


As we can see, change between versions of ruby is very easy to do, for example If you want to use the version 1.8.7 of ruby you only need to run the command "rvm use" passing the version to use as param.


3.- Gemsets


We had learned: how we can install many different version of ruby (and use it)! If we want to manage many different versions of gems, RVM gave us a powerful tool called Gemset. A gemset is a set of gems that we can use almost exclusively. So, we can have several gemset and use it in wherever project we want.


3.1- Create a gemset.


To create a gemset, we need to select a version of ruby we want to use (if we did not before) and run the following command: user$ rvm gemset create my_first_gemset


 


With this command, we're telling RVM to create a gemset with the name my_first_gemset


3.2- See the gemsets


To see the gemsets installed. we only need to run this command: user$ rvm gemset list


 


 3.3 Use a specific gemset


To use a specific gemset, we only need to run this command: user$ rvm gemset use my_first_gemset


 


Now that we're using a gemset, all gems that we install will be part of this gemset. Therefore, we can install a gem with different versions in different gememsets.

itexico@itexico-virtualbox:~$ gem install rspec
Successfully installed rspec-2.14.1
1 gem installed
Installing ri documentation for rspec-2.14.1...
Installing RDoc documentation for rspec-2.14.1...
itexico@itexico-virtualbox:~$

RVM is an amazing tool to manage our ruby environments! It's an easy way to switch between different versions of ruby and gemsets becomes it a powerful tool. 


Omar Reyes is a Software Developer with more than 4 years of experience in web development using Ruby, Java and Javascript. He currently works at iTexico as a Software Developer.


Contact Us


View the original article here

Mobile App Development: Boosting Guadalajara's Economy with Tech

Guadalajara has the third largest economy in Mexico. It is well know that the city's economy has two main sectors: commerce and tourism.



However according to the article by Robin Norvell (December 2005), Guadalajara Winning Back Business from Asia, it is the electronics and information technology sectors that have given the city the nickname "Mexico's Silicon Valley". Guadalajara is the main producer of software, electronics and digital components in Mexico. Telecom and computer equipment from Guadalajara accounts for about quarter of Mexico's electronics exports. Hence, there is no surprise for the given nickname.


Lately, we have been hearing or reading about the word nearshore when it comes to outsourcing.  Nearshore, in short, is to outsource the work force to neighboring countries of where the company headquarters are located. The benefits that nearshoring brings to a company interested in outsourcing is considerably better than going anywhere far. These benefits also include little or no time zone changes, no language barriers, travel time, and more.


Some of the growing business sectors within the Mexican Silicon Valley are web, mobile application, and other forms of software development. Some of the questions people are asking are: "Does the city that I choose have the potential and talent to satisfy my technology needs? Are companies at the same level of quality than the local companies?" Well, let see.


A couple of days ago an article was written by Dale Quinn for the Global Deliver Report included an interview with Guillermo Escutia (president of the western chapter of the National Chamber of Commerce for Electronic Telecommunications and Information Technology) along with iTexico's CEO Anurag Kumar, and COO Guillermo Ortega. The article explains about the growing economy of Guadalajara and how important the city's ties are to the US. I would like to highlight some quotes.

“The bulk of Guadalajara’s IT industry remains tied in with manufacturing electronic components for companies like IBM, Hewlett Packard and Jabil. But as smartphone users in the United States have gobbled up mobile applications for their iPhone and Android devices, a new production trend has emerged.”

“One of those companies is iTexico, an Austin, Texas-based firm that designs, tests and maintains software for devices on iOS, Android and other platforms. To supplement its team in the U.S., the two-and-a-half-year-old company has quickly established a robust presence in Guadalajara. The mobile app company employs about 60 people in the city, roughly 50 of whom are software developers, said CEO Anurag Kumar.”


Guadalajara has proven to be the right place to grow. As I mentioned before, within the nearshore model, the benefits lies with the time zone, the small or no language barrier, etc. Additionally the hiring cost is also lower, about half or less than what companies have to pay the engineers in the US.


The government knows this opportunity of growth and jointly with the private sector promotes and supports the technology, with scholarships, courses, and trainings to get people certified. These certification courses are also offered by iTexico. So there’s growth, talent, opportunity and interest from the government as well to grow talent among the mobile app and software development community.

"Guillermo Ortega, iTexico’s chief operations officer who founded the company with Kumar, said they "began to look into capitalizing on app design after noticing the pull in the U.S. market, before such demand had even emerged in Mexico. Since smartphones only came into widespread use in the past five years, there aren’t any companies or designers with many years of experience.”

“When it comes to competition from companies in the United States, it hasn’t been formidable. Many U.S. companies that design and develop apps then turn the apps over to iTexico for testing and management." said Ortega


iTexico has taken advantage of the opportunities by taking the lead on training software and mobile app developers.  Additionally, iTexico supports American clients with their delivery center in Guadalajara. Often people think that lower cost means lower quality, well, this is not the case. A major success for the company is because they have partnered with Appcelerator to impart official training courses using their mobile app software development framework.  This allows all our architects the capability to train the employees and to making them competitive to an international level. That’s something to take into account anywhere in the world.

For more information you can read the full article from Global Delivery Report here.

Alfonso Banuelos is currently a Marketing Associate at iTexico. He holds a Bachelor's degree in Marketing and a Diploma in Marketing and Sales Strategies from the University of Guadalajara. He is one of the main voices driving iTexico's Social Media updates and communications.

Contact Us

View the original article here

Mobile App Development: Rooting Android Advice for mobile developers?

As a developer, should you root your Android mobile test devices?


The pros and cons of rooting an Android mobile device for end-users have been a widely discussed topic on the web for a while now. It's undeniable that more advanced mobile users find root access as a must have feature on their devices as it opens the doors to have full control over them. For example, automation, customization and advanced privacy features are among the many reasons to subject a mobile device to this process. However, as a developer, is there much value on unleashing your Android mobile test devices? 


Depending on the test procedure that you follow for each test cycle on the apps you develop, you should consider the impact that rooting your test device will have. It is not only the root feature itself that should be added as a new variable, but you should also keep in mind that depending on the rooting method there are some additional steps that are required which might add new variables. For example, the custom kernels that provide the root access.


It is true that in most cases having root access doesn't interfere with the application that is being tested.  However, the main concern is that any instability that could appear on the device due to the newly installed kernel values or modifications done in the process and the chance that any of this unexpected behavior interferes with your testing. For instance, adding the possibility of misinterpreting said behavior as a coding error.


Some questions that pop up are:

Can you afford the extra time to run a test on a non-rooted device to verify any emergent issue is not caused by the modifications required to root it?"Can you afford a second device to run tests on it? As turns out, adding root access to a test device isn't worth the trouble, after all, some of the strongest reasons for it (as privacy security and customization) are not too appealing to a device that is not "yours" and it’s probably stored in a drawer most of the time.

It is probably tied to an anonymous account which doesn't really collect data that could be called "personal" and is subject to factory resets and clean ups depending on the mobile device maintenance process. So, why would you root it anyway?


For example, a scenario in which root access can help is getting access to streaming your device screen live to a computer.  This is where you can distribute said video as a demo to a client over the internet and it can be a good solution in case the APK can't be released to the client for any particular reason or the client doesn't have a testing device on their hands.


Other non-root applications allow you to show your device screen using updated screenshots in sequence. However, the time in-between screenshots can be painfully long to be able to make an appropriate presentation. Unfortunately, it looks like the occasions in which root access can prove its value are cornered to scenarios too specific to overweigh any possible hassle.


This is a situation where it is better to play it safe than sorry and it's advisable to have test devices as identical as possible to the target ones so rooting can turn more into a downside than an advantage on our development environment. Of course, there are always new tools and apps that can overrule this last statement. If you know of any "must have" apps for developers which they can take advantage of the root access, please go ahead and share in the comments below.


On the other hand, if your personal mobile device runs on Android and is not yet rooted, you should absolutely spare some time to read on the many topics online which discuss the advantages of having root access and it all depends on your main use of the mobile devices.


About the Author


Francisco de la Mora is a Computer Systems Engineer currently working at iTexico as Mobile Developer for Android & Titanium.  He loves to customize his gadgets to find their true potential.

Contact Us

View the original article here

Business Analysis - Solving App Development Problems like a Puzzle

The Wikipedia definition of Analysis is, "the process of breaking a complex topic or substance into smaller parts to gain a better understanding of it". I would like to submit a more specific definition as it relates to Software Development and Computer Business Analysis: The process of viewing a defined problem systematically in the hope of deriving an acceptable solution. Let's start with the phrase "a defined problem".



The word problem should not be loaded with any negative connotations. I mean it as a term in logic or mathematics. A problem is just a challenge to find a solution. I also use the word 'defined' in that many people still dream of computers or mobile applications making them more money with less work. The reality is that computers or mobile apps perform quick, successive, and perhaps complex logical or mathematical functions that sometimes lead to people making more money with less work.  The computer or a mobile phone is a tool that enables a greater human effort and not a substitute for human effort. Analysis can only begin once the dreaming ends and a specific goal has been defined.  The next part refers to using a systematic approach. I would like to spend the bulk of the article on this so let's come back to it. The phrase, "in the hopes of" implies that analysis does not guarantee a solution. The problem of teaching a computer or a mobile phone to read with comprehension is fun to analyze, but as of yet, no one has offered a practical solution. The last part is "acceptable". Given the constraints of time, money, and technology, many solutions are rejected. So the solution must be a good fit.

Now to the systematic part. The original definition defined analysis as break the big problem into smaller and smaller problems until understanding breaks forth. It still leaves a component of magic by assuming smaller problems are easier to solve. While this is true in many cases, the real question is why?  What is it about smaller problems that make them easier to solve?  In practice, I see two factors:

1) Smaller problems are easier to think about, and...

2) Smaller problems are easier to relate to. Bingo.

It is not about the size of the problem, it is how well you relate to the problem. Recursive analysis is about pattern matching.  Think of a large jigsaw puzzle. To assemble the puzzle, all you need to do is find where each piece goes and you’re done. In my family, we hunt for the corners first. In analysis, this relates to the constraints. What are the bounds of an acceptable solution?  Next, we look for pieces with a straight edge and connect the corners. Given the constraints of a problem, what are the objectives and how do they relate?  I don't focus on what is practical, just what is possible. Once we have most of the straight pieces in place, we start matching.  What piece has these colors?  What piece has this shape?  My wife might call out, "has anyone seen a piece that looks like Mickey Mouse"?  What she is asking for is a shape that is roughly circular with two appendages on one side or the ears of Mickey Mouse. Given that she knows the shape of the 'problem', she is looking for a solution that matches that shape. There are specific methods and tools useful to aid in analysis, but the basics are: define the constraints, define the objectives and how they relate, then look for pattern to emerge.

Too abstract? Let me submit a real life example. I was called to speak with a web app development client about a data management system that featured an archival component and a search engine. This company often was involved in legal battles and wanted all emails, instant messages, and text messages preserved for seven years to prepare for litigation. Because the company was quite large, the database was enormous. My role was not to build this, but to address a single concern: "How do we know we have it all"?  Because of my background in accounting, email, and low level programming, someone recommended the client speak with me.

Must be external of the software used to store and search the data. Must be compatible with the OS and programming languages already in use. Must be completed by a given date (10 months from this meeting). Must not cost more than X dollars (where X was 10% of the cost of the system this subsystem was to monitor. May read the storage database but must not write it in any way. As much as possible, work in isolation from the other team so the solution would not be a result of collaboration.

May I have a component in the stream that counts the messages?  Yes.  May I have the documentation as to how the other team plans to capture and record data?  Yes. May I have all the record layouts of what they capture?  Yes. May I run test data through a version of the system to see the cause and effect?  Yes.

I assume that for each input (by type) there is a predictable number of records written to the database.  Is this true?  Yes.

I know that an audit is three things: 1) Was the given procedure followed, 2) Was the expected result obtained, and 3) Is the evidence to support items 1 and 2?  If the input is processed as described in the documentation, the input should yield as specific number of output records. Random samples pulled from the input should have corresponding output records.

I will write my own hooks to count the messages. I will use the other team’s documentation to calculate how many records they should have stored.  I will read the number of record they did store. If they are within a given percentage and they percentage fluctuates above and below the expected number, then we can assume they are saving the right number of records.  I will pull from the message stream a small number of messages, add a serialize number to the bottom of the text, and return those messages to the message stream. Then I will use their search engine to find the number I assigned.  If there is any number I cannot find, they fail the audit. This process may be run on request or continuously. With a team of two web app developers, I will design and implement this system in six months.

They liked it. I won the contract. They asked me to start work right away.  It turned out to be a little easier than I thought to read the database and predict the counts. They decided not to modify the message text. So they dropped the random audit.  They did not hire the app developers and I did it myself in nine months. The solution was not really all that complex, but they interviewed about 20 people and only 10 proposed a solution. A few knew how to count messages in a stream. I was the only one the interviewed that matched the audit pattern to their problem.

Most people teach analysis by teaching commercial methods and tools. But perhaps it is more appropriate to teach common problems and common solutions. We should teach patterns and how in combination they yield solutions. It’s not just divide and hope for magic, it is looking for patterns from what we already know.

Al Wilgus is a current software developer with more 30 year as a programmer, systems analyst, business analyst and currently works at iTexico as a Senior .Net developer / Team Lead.  He holds a Masters in Business Administration and enjoys life in Guadalajara, Mexico.  His other interests are electronics, robotics, music and theology.

Contact Us


View the original article here

Saturday, November 30, 2013

Dear Colleague Letter: Division Human Resource Development (HRD) Directorate for Education and Human Resources (EHR) Employment Opportunity (Open Until Filled)

HRD 14-001

Dear Colleague Letter: Division Human Resource Development (HRD) Directorate for Education and Human Resources (EHR) Employment Opportunity (Open Until Filled)

November 4, 2013

The Division of Human Resource Development (HRD) announces a nationwide search for a temporary Program Director in the Excellence Awards in Science and Engineering (EASE) Program at the National Science Foundation.?Formal consideration of applications will begin on January 6, 2014 and will continue until a selection is made.

The Division of Human Resource Development (HRD) serves as a focal point for NSF's agency-wide commitment to enhancing the quality and excellence of STEM education and research through broadening participation by historically underrepresented groups - minorities, women, and persons with disabilities. Priority is placed on investments that promise innovation and transformative strategies and that focus on creating and testing models that ensure the full participation of and provide opportunities for the educators, researchers, and institutions dedicated to serving these populations. Programs within HRD have a strong focus on partnerships and collaborations in order to maximize the preparation of a well-trained scientific and instructional workforce for the new millennium.

The EASE Program is the umbrella for two presidential awards - Presidential Awards for Excellence in Mathematics and Science Teaching (PAEMST) and Presidential Awards for Excellence in Science, Engineering and Mathematics Mentoring (PAESMEM). Both PAEMST and PAESMEM programs are administered by the National Science Foundation (NSF) on behalf of the White House Office of Science and Technology Policy.

PAEMST was established by the White House in 1983 and the awards are the nation's highest honors for teachers of mathematics and science (including computer science). Awardees serve as models for their colleagues, inspiration to their communities, and leaders in the improvement of mathematics and science education. PAESMEM was established by the White House in 1995 to recognize U.S. citizens or permanent residents and U.S. organizations that have demonstrated excellence in mentoring individuals from groups that are underrepresented in science, technology, engineering, and mathematics (STEM) education and workforce.

NSF Program Directors bear the primary responsibility for carrying out the Agency’s overall mission to support innovative and merit-reviewed projects in basic research and education that contribute to the nation’s technical strength, security and welfare.?To discharge this responsibility requires not only knowledge in the appropriate STEM and education fields, but also a commitment to high standards, a considerable breadth of interest in and receptivity to new ideas, a strong sense of fairness, good judgment, and a high degree of personal integrity.

HRD is interested in an individual who will provide leadership and expertise in K-12 STEM education for the HRD division and may work with other HRD and EHR programs as needed.?The primary responsibilities for this position include the administration and management of all aspects of the PAEMST program. Additional duties and responsibilities of the individual include contributing to the management and implementation of the PAESMEM as needed.

Candidates must have a Ph.D. or Ed. D. in any STEM field and following the doctorate degree, six or more years of successful research, research administration, and/or managerial experiences pertinent to the position. Ideal candidates will have knowledge and experience with:?K-12 science and math educational systems; polices and issues related to science and math K-12 curriculum; and methods and strategies for evaluating and assessing K-12 teaching.?Also desirable is knowledge and/or experience with:?K-12 education state and federal policy; research on learning STEM in K-12 classrooms and teacher professional development; relevant STEM K-12 teacher professional organizations; coordination of geographically disperse individuals; educational technology and social media; and broadening the participation of underrepresented individuals in STEM (underrepresented racial and ethnic minorities, women, and persons with disabilities).

The position may be filled with one of the following appointment options:

Visiting Scientist Appointment: Appointment to this position will be made under the Excepted Authority of the NSF Act. Visiting Scientists are on non-paid leave status from their home institution and placed on the NSF payroll. NSF withholds Social Security taxes and pays the home institution's contributions to maintain retirement and fringe benefits (i.e., health benefits and life insurance), either directly to the home institution or to the carrier. Appointments are usually made for a one-year period and may be extended for an additional year by mutual agreement.

Temporary Excepted Service Appointment:?Appointment to this position will be made under the Excepted Authority of the NSF Act. Candidates who do not have civil service or reinstatement eligibility will not obtain civil service status if selected. Candidates currently in the competitive service will be required to waive competitive civil service rights if selected. Usual civil service benefits (retirement, health benefits, and life insurance) are applicable for appointments of more than one year. Temporary appointments may not exceed three years.

For additional information on NSF's rotational programs, please visit: http://www.nsf.gov/about/career_opps/rotators/.

Applications accepted from US Citizens. Recent changes in Federal Appropriations Law require Non-Citizens to meet certain eligibility criteria to be considered. Therefore, Non-Citizens must certify eligibility by signing and attaching this Citizenship Affidavit to their application.

Applicants should indicate program they are applying to within the cover letter and subject line of the email. Please submit a current CV and statement of interest to: hrdrecruit@nsf.gov. For more information, you may send an inquiry to Jermelina Tupas at jtupas@nsf.gov

NSF IS AN EQUAL OPPORTUNITY EMPLOYER COMMITTED TO EMPLOYING
A HIGHLY QUALIFIED STAFF THAT REFLECTS THE DIVERSITY OF OUR NATION.


View the original article here