Friday, May 31, 2019

Organizations and Opensource

The global smartphone penetration shows that around 50 percent of mobile users worldwide own a smart device. Mobile phone penetration in India is set to rise to 85-90% by 2020. This has led to a large scale penetration of computation devices into a large section of society.


Hence this technology is becoming an integral part of any discourse. It can also be said that for some of the current issues, technology is setting the course. For the rest of the issues, technology is having enough effect so much that, in its own way, it is influencing the direction of the discussion.


For the sake of this article, technology is referred to as the software that is actually driving a software application. When Social Media Platform is being referred to as a technology, the softwares under discussion would be Facebook, Twitter, Instagram, Reddit, etc. It is these softwares that decide as to who gets to see what content, which of the content are allowed and which content goes viral.

It becomes extremely important for socially responsible organizations, including NGOs, to select appropriate softwares for their operations in order to influence the popular discourses in the appropriate directions.

PS vs OSS

In the current world, most of the technology is dominated by proprietary software(PS). These are also known as closed-source-software, which are non-free, and the software’s publisher retains intellectual property rights, usual copyright of the source code. The problem with such closed-source-software is that there is no way of knowing as to how it is influencing the society at large. For example, now that WhatsApp is owned by Facebook, there is no way of telling if and how personal messages on WhatsApp are being used to select content to be shown on the FB wall. Currently, the alternative present out there in competition with the closed-source-software is the open source software(OSS).

Open source is a term denoting that a product includes openly available source code, design documents, or content with permission to use it as deemed necessary.Open-source software or other products are released under an open-source license as part of the open-source-software movement. Use of this term originated with software, but has expanded beyond the software sector to cover other open content and forms of open collaboration. One can contribute to this movement in any of the several available avenues of Open Source. Some of the recommendations that can be adopted by the organization are provided further.

Awareness

The first step is becoming aware of. Self-awareness as to how every single action is affecting the larger picture in the world of software needs to be understood. This awareness needs to be spread across the organization, even up to the individuals associated with it for the movement to be affective. With awareness, one also has to build enthusiasm so as to orient the people associated with the organization towards OSS. This is a challenging task for any organization and hence will have to make collaborative efforts to achieve it. This can be done in collaboration with other organizations like the FSMI.

At various levels, discussions need to be held on OSS. One can avail resource person from various backgrounds or organizations for these discussions. Innovative content can be created to suit specific organization needs like images, posters, and videos to spread awareness.

Adopt

Once the awareness is in place, the why has been answered. Now for the how. With awareness also comes the knowledge of alternatives that can be used in place of proprietary software. These alternatives need to be explored, understood, and adopted. In the case of an organization which is ideologically based then it does not suit it in any way to be using a pirated copy of proprietary software. Instead, OSS alternatives need to be explored and adopted.

Once adopted, the change will definitely not be smooth. There will be glitches and hiccups. These need to be addressed. Again this may need external assistance from other organizations, or even professional help can be availed.

Specialized training program on specific areas can be provided to a specific group of interested people. This group created within the organization will equip itself with expertise in OSS. This group can then lead the organization in the part-wise roll-out of OSS and handle any issues arising thereof.

Contribute

The OSS ecosystem is built on individual contributions by the community at large that involves all forms of actors. They can range from individual users to companies who contribute at various levels for the development of the OSS.

At the organization level, there exists human resource. If each individual does a small contribution at their level, then the amount of value added back to the software and hence to the society at large would be high. Note that contributions for OSS need not be only monetary.Just using OSS can increase its popularity. If any bugs are found, reporting them helps the OSS community to fix them, hence improving the software. If a usage discrepancy is found or genuine improvement or suggestion are identified, reporting them back to the community also counts as contributions.

For each OSS, identify the way of contributing back to the community. Integrate this learning into the awareness, training &adaptation process. Make it an organization culture to contribute back to OSS by including these contributions in the organization’s review board.

An Example

Wikipedia is a multilingual on-line encyclopedia with exclusively free content, based on open collaboration through a model of content editing using browsers, called wiki. It is the largest and most popular general reference work on the World Wide Web. It is owned and supported by the Wikimedia Foundation, a non-profit organization that operates on money it receives from donors to remain ad-free.

Organizations can leverage on this wide acceptability of Wikipedia by editing on a selected specific topic. An edit-a-thon is an event where editors of on-line communities such as Wikipedia, OpenStreetMap, and LocalWiki edit and improve a specific topic or type of content, typically including basic editing training for new editors. They often involve meet-ups, but can be distributed as well.  Such an event can be organized.

A few interested people within the organization can be selected and trained on a topic and also on editing. Either a meet-up can be arranged at a specific location or a remote meet-up can be arranged from the distributed location at a fixed time. There can be a competition format with prizes for the activities over a given period of time.

Conclusion

In conclusion, it should be noted that these are only a few suggested ways of how an organization can start influencing on the technological domain. This is just the starting point. Real influence can be had if one can influence the actual development of the software along the lines of actual public need and not on created or forced need.

With closed-source-software currently dominating the software industry, they own loads of user-generated data. Issues like Cambridge Analytica scandal will keep occurring. Moreover, not all such scandals will get exposed. Google, on the other hand, takes explicit user permission to access and use user’s data as it pleases and users feel that Google is too large a service to say no and miss out on its features. In today’s world, where data is gold, we all have to think on the monopoly of this resource and ways to break it.

To break this monopolized stronghold, building alternatives is necessary. Alternatives that do not have profit as their primary motive and are open to discussions and inputs even from the wayside. Remember that right from 1970 it has been said that ‘if you’re not paying for the product, you are the product.’ We need to stop behaving like products and start taking control of our own data, or at the least do what’s possible, choose alternatives over conventional.

Original Article was published here.

Saturday, December 16, 2017

A Touch-ing review

From the last post it is published that my OnePlus One currently has Ubuntu Touch installed on it. After using for nearly a month these are my current views.

The new look is really refreshing. It's workings are a little different wanting the user an initial attempt of adjusting. Once comfortable the ease of usage is very much friendly. Initially the absence of hardware buttons for back-home-backgroud apps felt like a handicap but then realized that this independence from the hardware buttons gives one two advantages. One that the orientation does not matter anymore for it is the same this way or that and second that it gives more space for the screen, in case a mobile is manufactured just for Ubuntu Touch.

The ideology of Left-Swipe showing the currently open apps, just as in the OS is very helpful. It also gives a new way to place regularly used apps on a launch bar. The Right-Swipe showing the recently used is much more comfortable than the android version of of long-click a button or a dedicated button for viewing this. This feature could probably be incorporated into android. Even in other screens it is the right and left swipes that provide additional action options that can be performed on that view.

Like for example for SMS on right-swipe option to delete is shown and on left-swipe option to copy/forward is shown. This is really helpful and convenient. Additional the landscape and portrait mode for SMS shows different view. With portrait one can see the preview of the SMS text making it just a question of orientation to view the text.

So from here let me list the problems of the Ubuntu Touch. There are simple ones but many and that's what makes it problematic. Like the one faced during the installation itself. The device is not getting detected. It is the same after flashing Ubuntu Touch, i.e. the mobile is not getting detected. Tried many things from lsusb command to adding the to doing a curl to adb_usb.ini. Yet the mobile would not get detected on Ubuntu, neither in Windows OS was it getting detected so that data could be transferred. So the last option was to use browser to upload / download data from drive.

The state of app support was already known as Ubuntu Touch still needs enough community support to get that app-store piled up but to me it was a surprise that Firefox was not available for Ubuntu Touch. If two great open-source don't team up it, sort of, dampens the enthusiasm. Further more the WhatsApp and Telegram apps are just wrapper apps to the browser ones. For WhatsApp app, the app gives a QR Code that we need to scan from the mobile while it is visible in the same mobile screen. Impossible. Telegram keeps logging-off after every few minutes and so in the app one has to login again and again providing the mobile number and then the SMS verification code etc. Interestingly in the browser Telegram never logs-off and so once logged in, even on restart the session stays.

Similar problem exists with connecting to a hidden network. Once connected, after a restart it would not connect to the same network automatically. On the desktop version of Ubuntu on selecting "Connect to Hidden WiFi Network" there is a drop-down list of already added hidden network but that is missing here. So every time one has to delete the saved hidden network, else it will cry duplicate network, and then add the hidden network which then connects immediately. Was it a generic problem or device specific is still unsure.

There is one more problem of restart. That is of the time update. If you see the home screen, a very innovative look with a sun-dial type of clock that reflects the day of the time, you will notice something interesting. The date is January 1970. In-spite of time setting for automatic update with network operator, it does not get updated on a start / restart. Only on connecting with internet does it get updated, probably using UTC clock.


One of the games tried was called Balls2. It is not a very graphics intensive game and on doing quick operations it would hang, the app and the OS both. The other games seemed migrated version of desktop apps and not modified to use the mobile screen capabilities. But that's different issue, i.e. the availability of proper apps for Ubuntu Touch, again probably due to the lack of community and companies interest for this OS.

Saturday, November 4, 2017

Getting on to a different bandwagon

In the previous blog the efforts of rooting and removing bloat-ware was reflected. Now the next lines of discussion on XDA was to install a custom ROM.

Now the deliberation was to find the best one for the purpose. So the search started for the best fit with google searches like "Best ROM for rooted android phones". So there was AOKP, Dirty Unicorn, OmniROM, SlimROMs, Ressurection Remix, Pac-Man ROM, Paranoid Android and several others. Each of these looked very much promising with several different features. Some of them like Dirty Unicorn, Ressurection Remix and Paranoid Android did not support OnePlus One, others like SlimROMs had the build created a long time ago and no update on it so far.

On the list provided on several different websites that are found on the search, the top one is almost always CynogenMod. It is really sad story to hear of the end such a happening ROM that dates  back as old as Android itself. So then next contender in line seems naturally LineageOS.

But from there a digression occurred when it was informed that Ubuntu OS has been migrated for OnePlus One. Now this is called Ubuntu Touch with all its resources available online.  After Ubuntu stopped support for the mobile OS UBPorts took it up. One can see that here that OnePlus One is a core device for this OS. Now with a purpose to try tinkering with mobile OS, this offer was enough tempting.

So from there started the quest to get the perfect installer. The first problem was to get the mobile detected on the mobile. For this tried different cables & different drivers (including the one from OnePlus website). After finding the perfect combination the efforts started to get Touch using the installer from here.

Now because my current machine was windows attempt was to use the installer to get it installed. Now this installer seemed not to detect the mobile when connected in fastboot mode as instructed by the installer even though. fastboot command itself was able to detect the device but not the installer. Multiple machines, multiple drivers and multiple cables all yielded to similar results.

Then used the CPT-Installer which was able to detect the device. That was a relief after all the efforts but the exuberance was short lived. The installer did detect the mobile and started the process. It formatted the data on the phone and then started the download-install process that was stuck for hours without any progress. At the end all that was left was a half-baked phone that would not boot as it had no OS in it. After checking that fastboot is still working it was ascertained that it was a soft-brick.

Ubuntu boot screenSo the last option was to follow the steps provided for the devices from the project site itself either by the magic-tool or by the system-image server. On finding the machine with Ubuntu installed the process went very smooth and the process completed in minutes. In case of any issues the Wiki too could be consulted. So very soon the colorful screen of Touch OS launched on OnePlus One
successfully.

Monday, October 2, 2017

They are the same but different



alcatel Flash 2Wanting to try to break out from the imposed dependence by mobile vendors wanted to try experimenting with rooting. I currently owned Alcatel Flash 2 device which had a screen problem. As you can see from the image, the screen was a little broken. 😊

So then started the quest for the perfect mobile that could be used for my experimentation. For that started using OLX. The process was simple. Find a sale post within budget (10K), then find the original cost of the mobile to see if the deal is realistic, then find the features are to be satisfying, and finally browse XDA-Forum to find if there is enough support for this model so as to be able to root and flavor it differently.

People on OLX are sometimes very unrealistic. They ask an amount close to the new one when it is clear that on OLX one is always looking for seconds. Sometimes it feels like a shop guy is selling a new mobile as "box-piece" on OLX. Anyways after lots of scouting, messaging, negotiating, calling and rejecting (reducing in number in that order) finally decided to visit one of the seller. It was OnePlus One. Though the cost was a little more than what was in my mind but still decided to give a visit. Several factors, including the fact that I was tired of further looking etc. I decided to get it.

After initial usage figured that there was hell lot of bloatware in this mobile. There was Cortona installed as a personal assistant, which was not corresponding with OnePlus. A Chinese company with Google OS adding Microsoft software as personal assistant!

So the first task that I embarked upon is to root it using this. Now the installation of custom recovery went smooth, but from there when choosen to install the SuperSu inbuilt in the TWRP the mobile would boot no-more. Only recently discovered that if we unroot things will move back to working state and then we can go ahead and root again with a different software. But at that time \ thought it had gone into a boot-loop and tried different solutions like running makefs command, which actually sent it into a boot-loop. After lots of failed experimentation of trying get recover it back decided to install stock-ROM got from OnePlus website. Directly working with TWRP did not work and hence had to run the script given with the bundle and ended up loosing the custom recovery.

More than loosing custom recovery the fact that the original OS of the mobile was lost was a little disheartening. Mainly because the stock-ROM  got from OnePlus website was nothing like the first original one. It had none of those huge bloatwares and no Cortona. It looked like the stripped-down version of original software made consciously for those who tinker with their mobile OS.

Thursday, November 12, 2015

StringTokenizer to split using multiple tokens in java

When trying to split a string over multiple tokens, the best thing available was thought to be the split. That way if we have to split over a string multiple times then we can split and then split over the splits, but what if there is more the be split over the parts, then we will have to split again.

Let me explain with an example. Say we have a URL that needs to be parsed.

URL: http://localhost/system/config/file/action/updateLogo?fileName=largetc.jpg&text=Company%20Logo
W

So if we have to read all the the path parameters and then also read the arguments then we have to do a split over the '/' parameter as below:

String[] urlTokens = urlFullPath.split("/");

Now let us say that we want to read the path arguments that are passed in the URL. Then we will have to do multiple splits over the path string to reach the desired variables. The below is one of the ways that it can be achieved.

String[] urlTokens = urlFullPath.split("/");
for (String urlPath : urlTokens) {
if(urlPath.contains("?")){
String[] argTokens = urlPath.split("\\?");
String[] argsParts = argTokens[1].split("&");
for (String args : argsParts) {
System.out.println("Args: " + args);
}
}
}

The output of the above piece of Java code would look something like:
Args: fileName=largetc.jpg
Args: text=Company%20Logo
That, as you can see, are a a lot of splits. Is there any better way. Probably there are a dozen ones. Here is one with StringTokenizer for easier manipulation.

There are two ways to specify a delimiter for a StringTokenizer object.

  1. In the StringTokenizer constructor pass the delimiter when initializing the object
  2. In nextToken() method pass the delimiter you are looking for next at runtime

Using StringTokenizer constructor

In the constructor one can pass the list of all the characters on which the string has to be split and accessed as:
StringTokenizer stringTokenizer = new StringTokenizer(theStringToParse, "/?&");
And then iterate over the tokens via a while loop as below:
while (stringTokenizer.hasMoreTokens())
System.out.println(stringTokenizer.nextToken());
Using nextToken method

To use by runtime parameter to the nextToken method, below is one of the ways:
while (stringTokenizer.hasMoreTokens())
System.out.println(stringTokenizer.nextToken("/"));
The token above can be changed as needed. One thing that needs to be kept in mind is that once a move to nextToken is done then the previous token is lost and one cannot do a trace back.

Split that URL
Combining all of the above here's a piece of code that can be used to extract the arguments passed in a URL as a key value pair.

StringTokenizer stringTokenizer = new StringTokenizer(theStringToParse);
// iterate through tokens of path parameters
while (stringTokenizer.hasMoreTokens()) {
String partOfToken = stringTokenizer.nextToken("?");
if (partOfToken.contains("=")) {
StringTokenizer tokenizeAgain = new StringTokenizer(partOfToken, "&");
while (tokenizeAgain.hasMoreTokens()) {
String argument = tokenizeAgain.nextToken();
String[] keyValueOfArgument = argument.split("=");
System.out.println("Key: " + keyValueOfArgument[0] + " and Value: " + keyValueOfArgument[1]);
}
}
}
The output of the above piece of code, when integrated with all the fans and flurries needed to execute would be, assuming the URL given at the beginning is the string to be parsed:
Key: fileName and Value: largetc.jpg
Key: text and Value: Company%20Logo 

Saturday, September 26, 2015

Is the net really neutral?


The recent debate on net-neutrality has become a major issue, so much that even Rahul Gandhi spoke on this topic. Further it has made it clear to general public that there are many intermediate players before any of the content from the internet is delivered to the end user. All these players are there with a business of their own that serves their personal interest.

A part of this not-so-simple structure of the internet is the government. Hence the Federal Communications Commission (FCC) was created to regulate interstate communications by radio, television, wire, satellite, and cable, as a watchdog of USA’s telecommunication industry. TRAI is the Indian counterpart working to regulate telecom services and tariffs in India.

There has been several comparisons of the internet to the electricity company for the purpose of debate on net-neutrality. This comparison is not exactly appropriate. Electricity does not have an inherent meaning within the flow of charged particles that inform as to what type of electric instrument is being used. For example, if the consumer is using a TV, or a fridge, or any other such specific electric appliance cannot be known by looking at the rate of flow of the charged particles. Other comparison are to the swing, where the swing movement is being controlled based on the payment made for the use of its functionality and to the buying fruits from a street vendor. These comparisons are rather more simplistic ignoring the more complex nuances associated with the internet.

A more appropriate comparison on this would be that of a postman. This is more appropriate because of two reasons. Currently the service providers work using multiplexing of data from different users over a single connecting. This is because the speed of underlying connections that are laid using optical communication systems are at rates of Giga-Bytes that are much higher than what an individual can use. For example the network speeds can go up to 100 GB/sec while the consumer will not be able to consume data at such a speed. Hence instead of giving the whole underlying network for one user at any specific time, the network providers put together data from different users in a single package(data over a network is sent in packets of data, one at a time) for transmission. Hence it is like a postman who is carrying letters in a bag and instead of carrying one person’s letters at a time the letters from multiple users are put in a bag and carried along at the same time.

The second reason that this analogy is closer is because the independent letters have the inherent information in it informing of the source and the destination and so allowing for a discrimination based on the meta-data, considering the content of the mail as the actual data. This model tries to model the complexity on a smaller scale.

Another argument being put forth is that of Internet Fast Lanes. This would allow the telecom operators to give preferential speed to companies with deep pockets while throttling speeds of others. This was shown by the comparisons with swing given previously in this article. But the internet already has a “fast lanes” because of CDNs.  These are distributed system of servers that provide content to the end-users with high performance and availability. In simple language when someone logs in to say facebook or gmail it is not guaranteed that all the data of their wall is coming from facebook server. Most of it may be coming from a CDN that is lying geographically very close to the user. That way the speed of delivery can be increased for quick response to the users. Akamai Technologies is the most popular CDN that delivers content to several privileged companies. As soon as a user opens or logs in to many websites one can see content being pulled from Akamai.com that will be displayed in a small pop-up at the bottom of the browser screen. Another technique being used are the peering connections where the content providers have direct connections to ISPs and run dedicated servers deep inside these ISPs to deliver content faster. Clearly these “fast lanes” are available to only those with deep pockets giving them an edge over the others with lighter purses.
In one of our previous article we pointed out that the internet is controlled by the gateway of the internet, i.e. the search engines. We had argued that if something is hidden in the 100th page of the search result, even if it is the most relevant accessible information, it is as good as non-existent and inaccessible. So the top positions for specific keywords if paid and occupied by companies, however irrelevant to it, then we can clearly see how deep pockets can tilt the internet to be not so neutral. So let’s face it.

The debate over net neutrality is not a recent one. It started in 2003 when the Columbia University media law professor Tim Wu coined the term. What we are still missing is a means of keeping the ISPs in check, else these debates will resurface in a newer form and at different levels. These debates also raise serious concerns that internet service providers are growing too powerful to influence a policy change. One way of exercising control is through common carrier law. These laws are necessary to define the framework in which the internet service providing companies have to function. There will definitely be opposition if it clamps down the current freedom being enjoyed by these companies hence it has to be done impartially by a third party including public opinion in their decisions.

The internet.org by facebook is being touted for being against net neutrality while Mark Zuckerberg defends it as being a plan to bring the internet to everyone. After the uproar, majorly in India, Zuckerberg expanded internet.org so as to allow developers to provide an app through Internet.org. Their argument is that the debate was over consumer choice and developer choice and they seem to have addressed them via their improved platform. Currently they are offering several projects that can work via their platform and an option to build more. Hence believingly the argument has moved further from the debate of providing lopsided access to the internet. Now the discussion has to be around as to which services and websites are or can be provided access via internet.org and who is to decide this.

Let us face it. The internet is not as much neutral after all and people with deep pockets will keep working to further their interests in further making work more in their favour. Let us get back to our analogy of the postman. The postal service is everyone’s necessary. There will soon be a day when the internet will also be such a necessary service, just like railroad, bus services or airlines. Hence what is being proposed is to regulate the telecommunications as common carriers.

Of course there will be arguments against the government gaining control on the network of networks arguing that it is the freedom that has provided incentive to the network providers to build the whole infrastructure that currently delivers internet. Another argument is that if the government holds the control then the whole process will be slowed down while these type of services need a faster response. The need of the hour is to further the debate on the common carrier and take a stand for the common good of the masses at large along with appropriate consideration to the involved parties.



Published Article Reference: http://thecompanion.in/is-net-really-neutral/