18 April 2015

Solving xmkmf: Command not found with imake

A couple of colleagues were trying to compile glut unsuccessfully for a couple of days, their tech-lead couldn't figure it out either and they decided to approach me.

Turned out that an error
xmkmf: Command not found
was perplexing everyone. A search showed me that imake had to be installed. I installed it and followed the instructions for compilation and in twenty minutes, the problem was solved.

Imake rpm for CentOS is here.
You can also do yum install imake

On jokingly asking if I'd get a treat for it, the tech lead kept gratefully saying "He deserves it" but the developer didnt seem impressed after seeing the simple solution. Reminds me of the story of the experienced engineer who is called to solve a problem with a machine that a lot of other engineers couldnt. He puts an X with chalk on the faulty part. It is repaired and the machine works fine. He charges $50000 for his consultation. The company is outraged for being charged so much for a tiny job and demand an itemised bill. The engineer writes:
$1 for the chalk mark.
$49999 for knowing where to put it.

As for the treat, it never really is about the treat. It's about friendship.

And about imake

Imake (a build automation system) was created to have a platform independent make. The "i" apparently standing for "independent". 
Imake generates makefiles from a template, a set of C preprocessor macro functions, and a per-directory input file called an Imakefile. This allows machine dependencies (such as compiler options, alternate command names, and special make rules) to be kept separate from the descriptions of the various items to be built.

06 April 2015

The secret of creating a beautiful website

I was in Mumbai for a couple of months, and the volunteering team I had started there has now grown to have a bunch of enthusiastic new software programmers joining the team.
We wanted a website of our own to present our activities and to interact better with our colleagues, but the volunteers weren't very familiar with HTML, CSS, JavaScript or JQuery.
Although I wasn't very familiar with JQuery, I had acquired a good knowledge of HTML, CSS and JavaScript.

To put to ease our volunteer's fears of the new languages, I spent three full days in getting a website prototype ready. Some of my priorities were:

  • It should make use of simple technologies
  • It should look good
  • It should be interactive


I chose HTML5, CSS3, D3.js and JQuery.


Spent many many many hours in finding out what the secret of a good looking website is. To cut a tree in 8 hours, spend 6 hours sharpening the axe. The secret is in how you use your images. It's the images and the graphics that create that first "wow" impact on your audience. If you don't have good looking images or graphics, create them. If you can't create them, hire someone who can. I've worked with Interaction Designers of international repute, and learnt a lot from them about design.
If you'd like me to create, improve or critique your website, I'd be happy to do so, provided it gives me value for my time and skill.

Do have a look at websites like Awwwards. They showcase a range of well designed websites you can learn from.


There's a huge amount of open source software out there which will allow you to effortlessly add some splendid interactivity to your website. Of these are d3.js, CSS animations and JQuery.
The interactivity in itself adds huge appeal to your website even if you have just a plain white background.


Most importantly, allow a good amount of space in your website. Try your best not to clutter it with information or content. Minimalist designs can help you with these decisions.

I created a little prototype and uploaded it on GitHub: https://github.com/nav9/EmployeeVolunteeringWebsite.

Our volunteers, on seeing the prototype, got inspired and were encouraged to learn and implement the rest of the website. With some further guidance from me, they made use of a lot of openly available knowledge and open source software to build what turned out to be a beautiful and interactive website which got "very very good's" from our HR department and our colleagues! A website by the volunteers, of the volunteers and for everyone! :-)

These are some screenshots of the prototype I created in just 3 days (attributions for open source code are in the readme file of the github project):

When developing a website, you need to have a good command over HTML and CSS. If you think you need Dreamweaver, then you seriously need to consider learning CSS properly, because even with Dreamweaver, you'll find it tough to make changes and understand what is going on under the hood.
My post on CSS will give you links on what to learn.

And oh...once you create the website, softwares like Xenu link sleuth will be indespensible in verifying if all your links work :-)

All the best!


Continued from the previous LOL page

Six Pack
Share with this link

Share with this link

Continued in the next LOL page

05 April 2015

Not losing those handy clutter managers

While I've already written about keeping wires neatly wrapped up (ideas of other people), here's one tip that I've created myself:

The little pieces of plastic which have metal wires inside them; the ones with which your electronic item's wires are kept neatly wrapped up with...

They're called Plastic Twist Ties.

Once you untangle the electronic item's cables, you wouldn't want to lose these handy plastic twist ties, as someday you'd need to either pack the item into its box or use the twist tie to hold together a bunch of cables. The best thing to do is to neatly wrap them around the cable itself. As shown in the picture below (it actually looks quite cool!):

Few decades back (and even now in some shops) in Kerala, these plastic twist ties are used to tie up the top of packets of bread. Handy things they are...as much as they're a plastic hazard.