Whoa..it’s been more than a year!

A year and six days to be precise, since I last blogged (about Interstellar). This should not be as surprising as I haven’t done a very good job on keeping the blog posts flowing in the past and have had even more extended periods of gaps in between posts. But it is surprising to me because I had decided to do more posts, just after posting the Interstellar review and then completely forgot about what I had decided. I’m hoping I can remedy that going forward. See, I do love the concept of blogs, but I just plain suck at documenting and recording stuff unless that task is forced upon me. I have decided (yet again!) to maintain this blog better. Let me start by documenting what has transpired in my life in this one year duration.

Quite a bit!

Sometime last year, after 3 years of working in the IT Service industry, I realized that I wanted to pursue education a little more. That led to me preparing for and writing GRE and TOEFL, writing SOPs, applying to colleges, requesting Letters of Recommendation. Finally, I did get into University of Florida for MS in CS. So, I hit the pause button on my job and prepared for starting school in Fall. Everything was in place when, I got diagnosed with having gall bladder stones. So, pause button on starting school as well. I requested the University to defer my admission to Spring 2016 as I proceeded to get my Cholecystectomy done. And now I am preparing for Higher Education – Take II. So, this was majority of 2015 in my life. Also, I got a little better at guitar. Oh yeah, I have been trying to learn the guitar on and off over the past year. See, stuff like this is what I should be blogging about and yet I haven’t. That’s just laziness I guess. And I have a new laptop which lets me game a little more smoothly. Its an Acer Aspire V5-573G with an i7-4500U, 8GB RAM, 4GB NVIDIA 750M Graphics and 1 TB HDD storage. It’s a pretty great machine and I am happy to say runs Linux almost flawlessly. But that’s a review for another time. For now let’s move on to what’s coming.

So, I have plans for a few blog posts in the coming weeks. An overview of Fedora Workstation 23, a review of Wolfenstein: The New Order and a review of Spectre. Now, me being me, I can’t say for sure that all this is going to come to fruition, but I hope that it will.

Until next time!

Interstellar – Boldly goes where no movie has gone before

I am a big time Christopher Nolan fan. The Dark Knight and Inception are my favourite movies. Ever since I heard that Christopher Nolan’s next directorial venture was going to be Interstellar, I have been waiting impatiently for it. Of course, the trailers didn’t help at all. Every time they released a new trailer, I would find myself going “Enough, just release it already”. So, when I went to watch it last week, I went in with some unparalleled hype and the fear of the movie not being able to live up to the hype. But by the time the credits rolled, all those fears had been dispelled and all that remained was “WOW” and a strong desire to rewatch it.

Now let’s talk about the movie for a bit. Don’t worry I won’t give out spoilers. This three hour ride of climate change, dust storms, wormholes, black holes, time travel, space colonization is stunning to look at. There is a scene in the movie where you get a shot of a spaceship passing a tiny speck of dust against the backdrop of a huge Saturn. Space has never looked so magnificent and frightening at the same time. Complementing the visuals is the soundtrack which will evoke a sense of grandeur as the characters voyage through the wormholes and the black holes.

At the center of the special effects extravaganza lies the love story of a father and a daughter. Set in the near future, Interstellar shows Earth reaching its end of life where dust storms are everyday occurrence and blight has killed off most of Earth’s food supply. Engineers, scientists have retired and have taken up farming as their day jobs. Cooper, the father played by the ever so stellar Matthew McConaughey(no pun intended) is a similar engineer turned farmer living with his daughter and son. Somewhat later in the movie Cooper has to leave his daughter Murph on Earth and into the unknown space to find an inhabitable planet where humankind can settle. Their struggle to get back together is what drives both the characters for the rest of the film. There is also a robot called TARS who has hopped onto the spaceship for the travel. With its humour setting at 100%, TARS provides a lot of comic relief in an otherwise serious movie.

This movie fulfills science fiction cinema’s promise – to fill our hearts with gleeful wonder all the while giving us something to ponder and think about.

Fix for brightness issue in Ubuntu 13.10

In Ubuntu 13.10, I found that I was unable to change the brightness either by using the brightness keys or moving the brightness slider in System Settings. To fix the issue, I had to change the file /etc/default/grub to reflect the following:

GRUB_CMDLINE_LINUX=””

to

GRUB_CMDLINE_LINUX=”quiet splash acpi_osi=Linux acpi_backlight=vendor”

Fix Hybrid Graphics high power consumption and overheating

[UPDATE]: Ubuntu now supports ATi + Intel hybrid graphics systems in the 13.10 and 12.04.03. Here’s how to make it work:

Make sure any other fglrx driver is not installed. Install fglrx and fglrx-pxpress as follows:

sudo apt-get install fglrx fglrx-pxpress

If you have added the lines in /etc/rc.local as in the previous solution, please remove them and reboot the system.

In my machine the AMD/Intel setup is working fine. There is no high power consumption and overheating of the system. Also, I am able to switch between the cards effortlessly through Catalyst Control Center. Thanks Ubuntu/AMD!

 

 

In systems with ATi + Intel hybrid graphics running *Ubuntu 13.04 and 13.10 distros, I have noticed high CPU usage and overheating resulting in very high power consumption and low battery backup.

For people facing the issue, this can be solved by adding the following lines in the /etc/rc.local file:

sudo chmod -R 705 /sys/kernel/debug
sudo chown -R username:username /sys/kernel/debug/vgaswitcheroo
sudo echo OFF > /sys/kernel/debug/vgaswitcheroo/switch

Replace username is the second command with your username.

After this run: sudo update-grub and reboot your system.

This is a temporary fix as here we disable the discrete AMD card and just keep the onboard Intel card switched on.

Playing MP3 files with java…

For a language as popular as Java, lack of standard ways of implementing mp3 playback is disappointing. This is understandable though, due to horde of patent and licensing issues relating to MP3 as a format. A bit of googling and I found two methods: using the Java Sound API along with the MP3 plugin and using the third party JLayer API from JavaZoom. Here I’m using JLayer as it seems to be the more popular alternative.

First we need to download the jlayer from here. Extract it and add the jl1.0.1.jar to the project. When using an IDE like eclipse adding the jar to the build path suffices otherwise  jl1.0.1.jar should be added to the CLASSPATH.

JLayer provides two built in players that play mp3s using the library: javazoom.jl.player and javazoom.jl.player.advanced. I’m using the Player class.

Create an instance of the Player class while providing a FileInputStream object of the mp3 file. Then use the play() method of the class to start playback.

Below is a very basic implementation of the playback process:

import java.io.*;
import javazoom.jl.player.Player;

public class JavaPlayerTest {

public static void main(String[] args) {
try
{
FileInputStream mp3file = new FileInputStream(args[0]);
Player playmp3 = new Player(mp3file);
playmp3.play();
}catch (Exception e) {
System.out.println(e);
}
}
}

Set up C/C++ environment with vim & mingw

For those who love writing code in vi/vim(let’s face it its the greatest code editor in the world) and miss it while using Windows, it is possible to set up vim in Windows. Here are the steps to install and set up Vim with MinGW(gcc/g++).

1. Download and install gVim from here.

2. Download MinGW automated installer from here and run the installer.

3. Select the package repository and the directory to install(default is C:\MinGW, I recommend leaving it as it is).

4. Select the optional components like C++, Fortran and MSYS base(this is useful; it provides the various bash shell tools like ls,grep,make,gawk etc).

5. The installer then downloads the latest version of the packages and installs them.

6. Finally, add MinGW’s bin directory to the PATH environment variable.

7. To test if MinGW is set up correctly, go to the command prompt and type g++ --version. If you see the version number as output, then congratulations.

Hope, this post has been helpful.

HTML Entities……..

Entities are essentially symbols in HTML jargon. Here is a list of entities and their codes courtesy Tizag .

Symbol Definition Numeric Value Correlating Name
Non-Breaking Space  
< Less Than < &lt;
> Greater Than > &gt;
Quotation Mark &quot;
¡ Inverted Exclamation ¡ &iexcl;
¢ Cent ¢ &cent;
£ English Pound £ &pound;
¤ Currency ¤ &curren;
¥ Yen ¥ &yen;
¦ Broken Vertical Bar ¦ &brvbar;
§ Section § &sect;
¨ Double Dot ¨ &uml;
© Copyright © &copy;
ª Feminine Ordinal Indicator ª &ordf;
« Left Angle Quotation Mark « &laquo;
» Right Angle Quotation Mark » &raquo;
¬ Negation ¬ &not;
® Registered Trademark ® &reg;
¯ Spacing Macron ¯ &macr;
° Degree(s) ° &deg;
± Plus or Minus ± &plusmn;
² Superscript 2 ² &sup2;
³ Superscript 3 ³ &sup3;
´ Spacing Acute ´ &acute;
µ Micro µ &micro;
Paragraph &para;
· Middle Dot · &middot;
¸ Spacing Cedilla ¸ &cedil;
¹ Superscript 1 ¹ &sup1;
º Masculine Ordinal Indicator º &ordm;
¼ ¼ Fraction ¼ &frac14;
½ ½ Fraction ½ &frac12;
¾ ¾ Fraction ¾ &frac34;
¿ Inverted Question Mark ¿ &iquest;
À Grave Accent-Captial A À &Agrave;
Á Acute Accent-Capital A Á &Aacute;
 Circumflex Accent-Capital A  &Acirc;
à Tilde-Capital A à &Atilde;
Ä Umlaut Mark-Capital A Ä &Auml;
Å Ring-Capital A Å &Aring;
Æ Capital ae Æ &AElig;
Ç Cedilla-Capital C Ç &Ccedil;
È Grave Accent-Capital E È &Egrave;
É Acute Accent-Capital E É &Eacute;
Ê Circumflex Accent-Capital E Ê &Ecirc;
Ë Umlaut Mark-Capital E Ë &Eml;
Ì Grave Accent-Capital I Ì &Igrave;
Í Acute Accent-Capital I Í &Iacute;
Î Circumflex Accent-Capital I Î &Icirc;
Ï Umlaut Mark-Capital I Ï &Iuml;
Ð Capital eth Ð ∓ETH;
Ñ Tilde-Capital N Ñ ∓Ntilde;
Ò Grave Accent-Capital O Ò &Ograve;
Ó Acute Accent-Capital O Ó &Oacute;
Ô Circumflex Accent-Capital O Ô &Ocirc;
Õ Tilde-Capital O Õ &Otilde;
Ö Umlaut Mark-Capital O Ö %amp;)uml;
× Multiplication × &times;
Ø Slash-Capital O Ø &Oslash;
Ù Grave Accent-Capital U Ù &Ugrave;
Ú Acute Accent-Captital U Ú &Uacute;
Û Circumflex Accent-Capital U Û &Ucirc;
Ü Umlaut Mark-Capital U Ü &Uuml;
Ý Acute Accent-Capital Y Ý &Yacute;
Þ Thorn Þ &THORN;
ß Small Sharp ß &szlig;
æ Small ae æ &aelig;
ð Small eth ð &eth;
ø Slash-Small o ø &oslash;
þ Small Thorn þ &thorn;
ΠCapital Ligature Π&OElig;
œ Small Ligature œ &oelig;
ˆ Modifier Circumflex Accent ˆ &circ;
˜ Small Tilde ˜ &tilde;
Zero Width Joiner &zwj;
En Dash &ndash;
Em Dash &mdash;
Left Single Quote &lsquo;
Right Single Quote &rsquo;
Single Low Quote &sbquo;
Left Double Quote &ldquo;
Right Double Quote &rdquo;
Double Low Quote &bdquo;
Dagger &dagger;
Double Dagger &Dagger;
Per Mile &permil;
Left Single Arrow Quote &lsaquo;
Right Single Arrow Quote &rsaquo;
Euro Mark &euro;
TradeMark &trade;

Chrome on Ubuntu 9.10

In my previous post, I gave a how-to of installing Chromium browser(development version of Google Chrome) on Arch Linux. In this post I’ll show you how to install Chromium on Ubuntu 9.10(Karmic Koala).
1. Go to System->Administration->Software Sources. Go to tab “Other Software”.
2. Click Add. In ‘APT Line’ paste the following:
deb http://ppa.launchpad.net/chromium-daily/ppa/ubuntu karmic main
Click Add again and paste the following:
deb-src http://ppa.launchpad.net/chromium-daily/ppa/ubuntu karmic main
Click Close and Reload.
3. In a terminal paste the following:
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xfbef0d696de1c72ba5a835fe5a9bf3bb4e5e17b5 && sudo apt-get update
4. Install chromium using the following command:
sudo apt-get install chromium-browser

That’s it. You’re done.
I’ve also made a screen-cast of the procedure. Yay! My first youtube video. 😀

Google Chrome on Arch..

Actually its not the official Chrome, but the open-source development version, better known as Chromium. I installed chromium from aur as follows:
yaourt chromium-browser-bin
After trying it out for a few minutes, I knew it was going to replace Firefox as my default Web Browser. It has certainly improved quite a lot since I last tried it on Ubuntu. It used to crash a lot then. Now, it has become rock stable(well, almost). It’s fast and snappy. It has got some great themes. On first start, it imported all my Firefox bookmarks. Also, another thing that I liked was the Opera-style speed dial that I always longed for in Firefox (Opera never quite did it for me). Overall its great, though there is one thing from Firefox that I still require on Chromium – something like the DownloadThemAll! addon for firefox. Hopefully, it will be developed ASAP. Till then I’ll go back to “The Fox” for big downloads.

Cheers!!