Thursday, 23 May 2019

1.1.1.1 - the Cloudfare DNS

Somebody heard of Cloudfare?

If not, visit them at 1.1.1.1.

Yes, the fastest public DNS resolver is from Cloudfare, and the IP is the above stated fancy IP address.

Now let's talk serious. Till the recent past, I have seen most of the people trying out 8.8.8.8 as well as 4.4.4.4. These are the public DNS from the most loved Google. But there are multiple faster options. Like the OpenDNS and Cloudfare.

Google is notorious for using people's data for their business benefits, this is for sure within the terms and conditions we agree upon, and 99.9999999999% of users don't even bother to read the terms document before clicking on agree or accept button.

Now, how fast?

As per www.dnsperf.com, 1.1.1.1 is more than 30% faster than the c competitor, OpenDNS.

How to make use of the DNS?

There are multiple ways. If you are a mobile device user then, just download the free app 1.1.1.1 available in the Play Store. If you have a home router, then a better idea would be to manually override the DNS settings to use 1.1.1.1 instead of the internet provider's automatically assigned ones.

The backup IP for Cloudfare is 1.0.0.1, another fancy one!

Saturday, 18 May 2019

Dynamic or Anonymous arrays in Java

As a Java developer, many might have encountered a silly problem which is very trivial to solve!

I have one variable or may be two. And there is some kind of processing to be done, of they need to be passed to a method as an input. Also assume that there exists a method(function) that could be reused. All good! But there is a minor problem if the method accepts only an array.

What is a the best way to solve this problem?

Creating an array which need not be us d further in the caller code could be polluting the code. A better way could be to create an array and just use it for calling the method alone.

How to do that?

Easy. Just try this:

new String()[]{variable 1, variable 2}

// Assuming the variables are of string type!

😇

Thursday, 15 August 2013

Android Keys Not Working

Recently, I dropped my android smart phone (its a Samsung Galaxy S2 I9100, Poland version) accidentally in water. Took it out immediately, opened, battery removed and put to dry. Got help from my lap fan outlet to get it dried with some good hot air!

The phone was working well till booting up, showing up menu and apps, tried calling, tried Blue-tooth and Wifi; everything was working fine.

No. no luck. The power button is not getting functional except for powering on the phone. Locking or the menu (Restart/Power Off/Air-plane Mode) on long press is not available. The battery is getting drained in 6-7 hours of time, which lasted 1-1.5 days with moderate use. Also noticed one more behaviour, the battery charging animation upon charging when the phone is turned off, getting stuck if I remove the power cable! Also, I cannot start the phone from that state using power button. I have to remove the battery to bring it back to original state and to use power button to boot the phone.

Went to nearest Samsung Service Centre and got the phone verified by them. They said they need to change the power button - a hardware failure. No answer for the question "then why it can be used to boot the phone?". Anyway, they are experts. So asked them to order the hardware for it and paid the advance.

Came home thinking, how to check the hardware of the key from software side. Planned to write my own Android app. And yup. Wrote a Key Tester app and it is available for you too @ https://play.google.com/store/search?q=FLOSS%20AG. But later when in to developing it, came to know that the app cannot do anything for me! Because it is not possible to capture the Home and Power key actions from Android apps, unless we register the app for the same, which won't work for my use.

Saturday, 10 August 2013

Ubuntu 13.04 Raring Ringtail - Stability Issues?

Recently upgraded the 12.04 LTS (long term support) version of my Ubuntu in my lap to 12.10 and then to 13.04. Just wanted to experience the richness of new features.

But the result was disappointing to me. It seems 13.04 ("nicknamed" Raring Ringtail) is too unstable. I like to compare this version release to that of MS Windows 7. Initially when released W7 was too unstable and later with the updates it became as stable as good old Win XP. Now I am getting frequent crash and error message pop-ups. More than the pop-ups, the feel of instability is hurting me bad. My 12.04 LTS was rock solid.

But wait: I recently dropped my lap on floor by accident. This can be a reason for the mis-behaviours from my new 13.04. It is not good to blame the software before solving the hardware issues - generally the generic ones like that of HDD or Memory. The OS can get errors at any point of time. Let me spend some time on fsck.ext4 commands. Will update this post once it is done.

Friday, 2 August 2013

Installing HandBrake video converter on Ubuntu 13.04

It looks like Ubuntu suits very well for my laptop, compared to the OEM Windows 7 with which the lappy was bought.

So started using most of the common tasks using Ubuntu. One of them was the conversion of downloaded movies, to make them supported by my TV. The answer was HandBrake, an open source solution to do the job across Windows, Mac and Linux.

Let's talk about the installation. Since the OS is ubuntu installation went like a breeze.

Step 1: Add the repository

sudo add-apt-repository ppa:stebbins/handbrake-releases

Step 2: Update the repos.

sudo apt-get update

Step 3: Install HandBrake

sudo apt-get install handbrake-gtk

Flossga's First Blog Post

Hello World!

This is my first blog post! Welcome all...!

 :)