Google Code-In 2015/2016 just concluded and it was an enriching experience to be a prime segment of this cool initiative.
It feels great to have worked as a Mentor for Google Code-In 2015/2016 under FOSSASIA organization 🙂
I strongly believe that helping people steer their careers in the right direction is a key element in developing. The esteemed task of mentoring is an essential leadership skill. In addition to managing and motivating people, it’s also important that one can help others learn, grow and become more effective in their lives.
My experience with mentoring Google Code-In tells me that mentoring is a rewarding experience, both personally and professionally. It not only aids in improving communication skills but also brings about a a great sense of personal satisfaction. One gains a new perspective of thinking and gets to advance technical skills by learning together with the mentee.
The mentor-ship experience was a surreal one. I never knew my answers and feedback to simple questions could be the cause of someone’s high spirits. It made me realize the impact one’s guidance could have on a budding developer. My feeling of immense contentment was augmented by the innocent tweets and blog posts of the mentees expressing their gratitude and happiness. (refer a few screenshots attached 😀 )
The journey in this field will urge to shed all inhibitions, keep pride aside and dive into this worthy mission of building a powerful community. The small interesting conversations and tasks will sometimes leave a deep impact on the mentor as a person, after-all not everyday one comes across a student submitting “Peace Pledge: No ! To war and distrust” to his/her mentor where both belong to two countries supposedly at ‘cold war’ 😉
I am also of the view that by being a mentor to a newbie, we pay our regards to the entire computing sphere and its fraternity.
Helping the mentee have a smooth transition into the tech world helps make long lasting associations and ensure a better future.
A season of mentoring gone by, excited for another already !
The intended “searchQuick” (sQuick) is an application to enable a user to search a set of books or texts, like an encyclopedia, or some other topical book collection offline built in the open source platform Pharo 4.0.
Bringing up to the rear of the summers, the project was brought to a penultimate stage by achieving the following tasks:
Handling empty string searches by raising error pop ups.
This post aims to put forward the basics of Build Automation and also brief the steps required to put up a Pharo application on Continuous Integration, Inria which is a platform for Scheduled Automated Build.
For simplicity, Build automation is the act of scripting or automating a wide variety of tasks that software developers do in their day-to-day activities including things like:
compiling computer source code into binary code
packaging binary code
running automated tests
deploying to production systems
creating documentation and/or release notes
Various types of automation are as:
On-Demand automation such as a user running a script at the command line
Scheduled automation such as a continuous integration server running a nightly build
Triggered automation such as a continuous integration server running a build on every commit to a version control system.
In recent years, build management tools have provided relief when it comes to automating the build process.
The dominant benefits of continuous integration include:
Improvement of product quality
Acceleration of compile and link processing
Elimination of redundant tasks
Minimization of ‘bad builds’
Have history of builds and releases in order to investigate issues
Save time and money – because of above listed reasons.
A build system should fulfill certain requirements.
Basic requirements:
Frequent or overnight builds to catch problems early.
Support for Source Code Dependency Management
Incremental build processing
Reporting that traces source to binary matching
Build acceleration
Extraction and reporting on build compile and link usage
Optional requirements:
Generate release notes and other documentation such as help pages
Build status reporting
Test pass or fail reporting
Summary of the features added/modified/deleted with each new build
Considering the above mentioned advantages of automated build, the below enlisted steps will help to put up your own Pharo application hosted on github on the CI server for continuous integration/scheduled build.
1. Log on to Continuous Integration, Inria website (https://ci.inria.fr/).
2. Click on ‘Sign Up‘ at the top-right corner, enter the required details and register for CI.
3. From the ‘Dashboard‘ option located at the top most of the screen click on ‘Join an existing project‘ blue button as shown .
4. Search ‘pharo-contribution‘ in the enlisted public projects and click on ‘Join‘
5. On clicking the ‘Join‘ button, a message stating: “Request to join the project ‘pharo-contribution’ sent.” appears.
6. It might take a day or two for the request approval mail to deliver at your registered Email ID.
The E-Mail content is as follows: Your request to join pharo-contribution has been accepted Hi _ _ _, Your request to join the project pharo-contribution has been accepted ! Regards, Support team.
7. Click on ‘My Account‘ option and under ‘My Projects‘ check the status of pharo-contribution project. It should state ‘member‘.
9. Read all the steps mentioned carefully. After going through all the points, click on the ‘New Job‘ mentioned in point 2 on the Project Job Template web page.
10. Enter the ‘Project Name‘ in the ‘Item Name: ‘ box and choose ‘Copy from existing item‘ option and fill ‘JobTemplate‘
11. After clicking OK, You will be directed to your project configuration.
12. Fill in the description of the project in the desired box.
13. Fill int the configuration details of your project like:
* Maximum number of builds * Link to GitHub Project * Source Code Manager * Build Triggers * Schedule of build (@hourly, @daily, @weekly, @fortnightly, @monthly, @yearly etc.) * Configuration Matrix (User Defined Axis: Name && Version Values- stable, development etc.) * Build environment options * Post-build actions * Report regressed tests
14. The main task is to carefully write the commands in the ‘Execute Shell‘
The default commands are as:
15. After saving and applying the changes, the application is all set for automated build.
16. Each build’s ‘Console Output‘ can be used to analyse the steps and highlight the weak areas of the project.
For instance: The below output is of a project whose stable version build was successful.
TIP: Keep a regular tab on the build results and analyze each line of the Console Output with utmost care.
Hope this post was able to help you start with the automation build process of Pharo Application.
Do like if it was worth a read ! Post queries/suggestions as comments 🙂 Looking forward to them.
UPCOMING: Next, I plan to share experience of putting up my Pharo application searchQuick on CI Inria for automated build. I intend to detail about the various configuration settings applied along with the Execute Shell commands utilized for a GitHub project 🙂
The intended “searchQuick” (sQuick) is an application to enable a user to search a set of books or texts, like an encyclopedia, or some other topical book collection offline built in the open source platform Pharo 4.0.
After the chief tasks of search functionality and automated build were done with, the next undertaking included working on finer details and embellishments.
Embedding Jenkins automated build status icon in GitHub markdown file
Relative widget re-sizing by using ‘World extent x‘ and ‘World extent y‘ co-ordinates instead of hard coded co-ordinates
Modifying the Accordion Widget by addition of ‘Search Bar‘ at the top
Checking for duplicates in the ‘Browse Files‘ menu, thus reducing the CPU consumption
Equalizing the sizes of all the windows to bring uniformity
Addition of ‘Scroll Pane‘ in accordion search result display list
Multi-line search result display by extending the Expander Title Morph and use of new line character in labels (otherwise not supported by default)
Truncating file content to first n characters for neater look in Expander Title
Latest Screenshot of Accordion Widget: UPCOMING:
Removal of OK & CANCEL buttons (present by default in Pluggable Dialog Window) from Accordion Widget
Implementing of Search via the result window as well
Relative re-sizing of background images (Image Morphs)
The intended “searchQuick” (sQuick) is an application to enable a user to search a set of books or texts, like an encyclopedia, or some other topical book collection offline built in the open source platform Pharo 4.0.
The main task achieved was putting up the application up on Continuous Integration, Inria for automated build. It was indeed a beneficial idea as it helped me keep a check on the builds and work on issues.
Being a newbie, this work was cumbersome initially but with the help of my mentors and the #pharo community, I was able to accomplish it. To assist fellow Pharo-ers, I have compiled all the information regarding CI Automated Build for yout Pharo Application and published the same on my blog-spot. Kindly go through it for a complete understanding 🙂
The intended “searchQuick” (sQuick) is an application to enable a user to search a set of books or texts, like an encyclopedia, or some other topical book collection offline built in the open source platform Pharo 4.0.
As the rudimentary structure of the application is sewn up, embellishment of GUI and rigorous testing are the major part of course of action.
On eMBee’s ( +Martin Bähr ) suggestion to build up an accordion widget to display the search results, various trials were conducted to design a similar one in Pharo.
The task of developing the accordion widget in Pharo was achieved using Expander Morphs. Looping through the search results array, a #newExpander: was added in each #newRow: of the modal built.
A challenging chore was to add a scroll-able content on the click of the desired search result expander. Sundry experiments with #newLabel: and #newText: in #newScrollPaneFor: {i.e. adding text model and labels in scroll pane} had no effect. Eventually, #newTextEditorFor: did the trick and the desired look was created.
Next on the cards is putting up sQuick for automated build on the CI Server, as suggested by +Sean DeNigris for its various advantages which include:
Improvement of product quality
Acceleration of compile and link processing
Elimination of redundant tasks
Minimization of ‘bad builds’
Have history of builds and releases in order to investigate issues
Save time and money – because of above listed reasons.
For simplicity, Build automation is the act of scripting or automating a wide variety of tasks that software developers do in their day-to-day activities including things like:
compiling computer source code into binary code
packaging binary code
running automated tests
deploying to production systems
creating documentation and/or release notes
UPCOMING:
To achieve Build Automation for sQuick, I have already registered on CI and configured sQuick.
Next endeavor is to look into the red signal in the build evaluation.
Stay tuned for more….Post any queries, will be happy to help 🙂
So, while I was browsing through various developments in Pharo, I came across a very eye-catching paper on Bootstrapping Reflective Systems: The case of Pharo .
For beginners, Bootstrapping is basically the process of writing a compiler or an assembler in the source programming language in which it is intended to compile. Applying this technique leads to self-hosting compiler that proceeds without external input.
Though, I am still a newbie and in the process of grasping all this ingenious stuff.
But I am sure that this paper ( Poli12-BootstrappingSmalltalk-SCP ) by G. Polito , S. Ducasse , L. Fabresse , N. Bouraqadi , B. van Ryseghem would make for an interesting read.
Do scan through it and post below your ideas and queries !
This post aims to provide a basic overview of what PharoLauncher is and give a step-by-step approach on how to use this application of great advantage.
Overview
Pharo is an open source implementation of the programming language and environment Smalltalk. Pharo is not Smalltalk. Pharo is Smalltalk-inspired.
Pharo offers strong live programming features such as immediate object manipulation, live update, and hot recompilation. Live programming environment is in the heart of the system. Pharo also supports advanced web development with frameworks such as Seaside and more recently Tide.
The official Pharo website defines it as: ”Pharo is a pure object-oriented programming language and a powerful environment, focused on simplicity and immediate feedback (think IDE and OS rolled into one). ”
Pharo relies on a virtual machine that is written almost entirely in Smalltalk itself. Pharo environment is its own little world, designed around a conception of a computer with a minimal operating system and populated with living objects. A Smalltalk implementation is composed of an image (binary code), a major source file and a ‘changes’ file. The image is called Virtual Image (VI) because is independent of the platform you use for running Smalltalk. Smalltalk systems store the entire program state (including both Class and non-Class objects) in an image file. The image can then be loaded by the Smalltalk virtual machine to restore a Smalltalk-like system to a prior state.
As Pharo is open source, it growing rapidly owing to the contributions of people all around the world. Each day we have a new update of the image of Pharo which makes it cumbersome to keep track of updates. It becomes quite a task when one has to download a new image seperately each he/she plans to work on something having the latest issues fixed, new features added etc. That’s where the PharoLauncher comes in the picture. Pharo Launcher, a cross-platform application that
lets you manage your Pharo images (launch, rename, copy and delete);
lets you download image templates (i.e., zip archives) from many different sources (Jenkins, files.pharo.org, and your local cache) and create new images from any template.
The idea behind the Pharo Launcher is that you should be able to access it very rapidly from your OS application launcher. As a result launching any image is never more than 3 clicks away. “PharoLauncher” is useful to a user who develops and needs to constantly switch between images. PharoLauncher is also a very handy tool to download specific image update versions if you want to reproduce or fix Pharo bugs.Pharo Launcher is a Pharo-based application allowing you to manage a list of images (download, rename, delete) and switch between them without aditional tools.
Downloading/Installing PharoLauncher
As discussed earlier about the rapid evolvement of Pharo , kindly check out http://www.pharo.org/download to get the latest download/install instructions for Pharo Launcher.
If you don’t have the add-apt-repository command, install the software-properties-common package and try again. If you are on a server (no GUI), you can get a Pharo Virtual Machine by installing pharo-vm-core.
On Ubuntu, the Launcher is installed as /usr/bin/pharo, so you can type the following command on the terminal to start the Pharo Launcher.
Launch the Pharo launcher image using the platform-specific VM. The image below depicts how a PharoLauncher looks like when it is opened.
The screen displayed initially has been divided into two parts.
The left part ‘Existing Images’ displays the images already created by the user. Initially after the installation the left side with local images is empty. Whereas the the right side is the ‘Templates’ section which displays the image templates from various resources available for download from the internet. The ‘Existing Images’ section has 3 buttons : Launch, Delete and Refresh. The ‘Templates’ section has 2 buttons : Create Image and Refresh.
At the bottom of the launcher we have the buttons for quit and settings.
Select the image you wish to work on from the list and the sources provided in the ‘Templates’ section and download it. For instance you can download “Pharo4.0 (beta)” from the options provided which is the latest image as of today. By clicking on the ‘Create Image’ button at the top right corner.
Note that also the images from contribution CI are available. So you can easily download “Artefact”, “Moose”, … images according to your choice.
It will download the image into a specific directory somewhere in your users home directory. Each image gets an own folder. Use the “Show in folder” menu item to open this location.
The location of the images can be changed through the ‘Settings Browser’ option located at the bottom-right corner. Go to the ‘Open Settings’ > ‘Location of your images’. Now enter the desired path in the place provided as shown in the figure.
After ‘Creating an image’ , a dialog box appears which asks you to give a name to the image as shown in figure below.
After entering the suitable name , the image is displayed in the ‘Existing Images’ section.
To launch the image, simply select your option and click on the ‘Launch’ button located at the top right corner of the ‘Existing Images’ section and voila ! You have the pharo image of your choice running with the name of your choice.
The intended “searchQuick” (sQuick) is an application to enable a user to search a set of books or texts, like an encyclopedia, or some other topical book collection offline built in the open source platform Pharo 4.0.
After indexing the content and the next task that was covered was searching for the user input string. The #queryString: does a fantastic job as of now.
The search results were printed in a scroll-able pane by iterating through a loop so as to cover each and every existence of the desired string. The search results window also enables the user to view the content of the chosen file.
Search Results Display
Acting on the suggestion of my mentor, I have also loaded the Pharo image with text versions of large books (Thank You Project Gutenberg 🙂 ) to test the working of the search function.
UPCOMING
GUI Modification
Integrated Exhaustive Testing
Addition of help/tutorial
PS: The GUI of the application is under constant evolvement, Kindly ignore the poorly structured window 😛
Stay tuned for more… Post any queries , will be happy to help 🙂
The intended “searchQuick” (sQuick) is an application to enable a user to search a set of books or texts, like an encyclopedia, or some other topical book collection offline built in the open source platform Pharo 4.0.
After the GUI was designed with minimal features, the next task was to develop the cardinal search function.
Indubitably, a well-run search application/engine requires indexing.
Search Application/Engine Indexing basically collects, parses and stores data to facilitate fast and accurate information retrieval.
That being, the index for sQuick was built using the Dictionary data structure in Pharo which works like HashTable of other programming languages/platforms.
index := Dictionary new.
Pharo describes a Dictionary as: “I represent a set of elements that can be viewed from one of the two perspectives: a set of associations, or a container of values that are extremely named where the name can be any object that responds to =. The external name is referred to as the key. I inherit many operations from the Set. “
The contents of the text files present in the current Pharo image were split at whitespaces and added to the index along with the corresponding file title.
tokens := ‘ ‘ split: aDocument contents.
The method #indexFiles was used to iterate over all the text files in the current Pharo image to index all the files before the searching begins.
Dictionary Entries after File Content Indexing
The #queryString method has been temporarily build using #includesSubstring which matches the user input string with all the entries of the index and gives the result in an array form with #tally output as the number of search results.
Various test methods are now built to inspect the functioning of the methods designed. Continuous debugging is being done to check out and remove errors, if any 😉
UPCOMING:
Improve the indexing technique
Explore methods to quicken the search functionality
Integrate the search routine with the GUI already built
Design more test cases to develop a bug-free application
Stay tuned for more… Post any queries , will be happy to help 🙂
You must be logged in to post a comment.