Sunday, February 03, 2013

My prediction for the new wave of consumer electronics

Remember the time when new laptops/desktops were fun to have. A laptop was a must have for college (I never had one, but thanks to my brother I had a great computer, where I learnt all my programming). The new rage is now the new era of merged functionality


  • Mobile
  • Photos
  • Email
  • Maps & GPS
  • Games
  • Internet browsing
  • Video calling


The gadgets out there are amazing, to be honest I own quite a few of them. I've had a prediction for a while on what would happen next (happen next to the laptop/notebook world). Lets look at the pros and cons of the mobile computing era devices versus laptop/desktop world

Pros

  1. Easier to carry around
  2. Single device to carry (integrated functionality)
  3. Cheaper software licensing cost (games for $5, etc)
  4. Touch capability (better user experience)
  5. Growing compute and memory capacity


Cons

  1. Limited storage
  2. More frequent recycling
  3. Not upgradable in any sense
  4. Faster obsolescence
  5. Harder to create content (programming to be done on laptops/desktops, documents are hard to create)
  6. Very limited screen size



Gadgets are fun and most people don't care about limited storage today or content creation, but limited storage along with faster obsolescence along with limited ability to create content will help the desktop/laptop world emerge back.


My prediction based limited storage and changing laptop world (touch screen) is that the laptop world will emerge back and win again.



Sunday, January 27, 2013

Operating Systems and their UI era

This afternoon as I had free time to ponder on something totally unrelated to the need of the hour, I was thinking of user interface evolution through time. I'd like to quickly classify them as

1. *NIX era
2. Desktop era//Gaming console era
3. Mobile device/Tablet/Cloud computing

NOTE: *NIX/Desktop and Mobile devices do co-exist today, but the era classification is based on popularity as read through magazine articles/online and casual discussions

The first *NIX era was a terminal era, with limited terminals (remember the phosphor screens) and wonderful keyboards that lacked (arrow keys, I just have to assume looking at the design of the original vi). The UI was quite straight forward (text), of course there were some high end workstations as time evolved. The most popular *NIXes were BSD and AT&T variants

The desktop era started with the PC and DOS. Keyboards were designed for non programmers, they were friendlier. With the introduction of GUI OS's, mice and keyboard were the primary input devices (supplemented by new generation pen & other new input techniques, but the focus was mice and keyboard). They had good GUI's, nice video and sound cards and were optimized for keyboard and mice. This lead to a sporadic growth in Internet usage, gaming. DOS/Windows/OS-X and MAC-OS variants with new design inspired from *NIX, but still different were the ruling OSes. *NIX were pushed to large systems where they would continue to run and serve large workloads as before.

The latest trend is mobile/tablet computing, this is again a market captured back by variants of *NIX (Linux - Android) and iOS (BSD) variants. Touch screen with LCD front ends with gesture awareness and multiple sensors are dominant UI inputs. It is good to see OS's designed on older principles race into the new era where voice input/GPS sensors/Cameras/touch screens/gestures are the primary interaction points with a lot of automation and simplicity built into the software on top of them. As I write, these devices are making their way into gaming consoles as well. These workloads are well supported in the back end with cloud computing work flows that provide the necessary horse power for calculating complex map routes, document editing and much more (most of these are again based on Linux servers).

I suspect the next generation will be projector driven devices, it will be interesting to see how *NIX variants will drive the next generation of computing devices.

Monday, September 03, 2012

Algorithms beyond school

I was working on a list of algorithms a new college graduate ought to know to either

  • Do well in an interview
  • Make quick progress through the learning curve

Here is the list I have so far, I would appreciate comments on what else to add

  1. Population Counting
  2. Multi-precision Arithmetic
  3. Fast Fourier Transform
  4. Fast Prime Number Generation
  5. Quicksort
  6. Union-Find
  7. String searching (KMP, Regular Expressions)
  8. Polynomial Multiplication
  9. Calculation of Pi
  10. 8 Queens Problem
  11. Instance of a turing machine simulation
  12. Tries
  13. Radix Tree
  14. Red Black Tree
  15. Huffman's algorithm
  16. Graphs - DFS, BFS
  17. Graphs - Bipartite
  18. Minimum Spanning Tree
  19. Hashing algorithms
  20. Linear programming?
  21. Classes of problems - P/NP/?
  22. Vertex Cover?
  23. Synchronization (locks/mutex/spin locks)
  24. Lockless algorithms
How does the list look?



Thursday, April 19, 2012

A night that stole more than just my sleep

What a night.. I lost all useful data on my desktop due to (a) lack of sleep (b) eagerness to install Fedora 17 Beta. How this happened is a long story, but here is the sequence of events

  1. I saw Fedora 17 Beta (got excited with the new release features)
  2. Got excited and upgraded my Fedora 15 (that I had maintained since Fedora 10 and kept doing upgrades) to Fedora 17
  3. Neither ATI proprietary nor the open source drivers work
  4. I decide to reinstall Fedora - Except that I used my home partition as root partition. I've lost all my scanned documents, my open source repositories (so many of them) :(. My programming, my SDK's, my projects, my articles, my documents, my downloads... I am going to cry. Moral of the story, backup is not for dummies, it is for everyone! Anyway, I am too arrogant to backup, even now :) Leave me alone!
  5. On the reinstalled partition, I am back to (c)
  6. Today, after extensive debugging I find out all my xorg.conf hacks don't work -- why? Apparently X has gotten smarter and needs additional options to enable specific monitor sections in xorg.conf to a specific output. By default all my configuration was being applied to my HDMI output.
  7. I figure it out, fix the display and now I am back to starting off from lot of empty space and this post.
  8. Thank god, I use some tools to keep my web data in sync and have backup of some key things (Oh! come on, everyone knows I was lying.. I do maintain backups on USB sticks once in a while, but not enough to stop complaining, yes I still lost all my data). Confused?

There you have it, thanks for reading my rant.. now back to work!

Saturday, March 31, 2012

Poem of Physics


Oh! I hope you see my plight
Why does light travel at the speed of light
Which almost seems infinite!
When I think of infinite, I think of god
Does he hide,
Like the infinite?
Hidden in corners, exposed by the equations right
I can see the infinite, but not his might
In a circle so beautiful, like the zero
But, yes sometimes I wish I never know
For its the unknown that makes us go

-- Balbir Singh

Saturday, February 11, 2012

Wish list of books - need suggestions

I've got a big list of books that I own. Here is what I intend to purchase in the next set. I am looking for suggestions on what would make useful reading? I am open to all categories of fiction/non-fiction/technical books. It would help if you point me to a review or provide me your own review comments

Enumerative Combinatorics - volume 1 (second edition)

The second edition is out and available at math.mit.edu/~rstan/ec/ec1.pdf


The book is extremely well written, although I've forgotten and probably never read a few of the topics mentioned in chapter 1, like one dimensional complete local ring. From where I stand at the moment, completing chapter 1 and understanding the twelve fold way will be quite an accomplishment :)


Do checkout the book. The first chapter is 221 pages with 203 exercises at the end.

Sunday, August 28, 2011

Review: Sage Beginner's Guide (Fantastic Book on Sagemath)


Sage Beginner's Guide  is an introductory book for the Sage math software, an open source mathematics system. Sage is a free alternative to Mathematica, Maple, and Matlab. The book does a great job explaining the basics of Sage. Each chapter is well written with my favorite "Time for Action", that allows the reader to explore the software and understand the experiment in depth. It is a great way to explore how things work and completely in line with what the book says "learning by doing: less theory, more results".


The first chapter is a tour of "what can be done with Sage". The second chapter deals with installing Sage across a variety of platforms. Chapter three eases the user into the sage interface, it discusses how to use the CLI, the notebook interface and get help. Chapter four is all about python; the chapter does a great job introducing python: one of the best I've seen in a book. It arms the reader to work with Sage and python.

Chapter five focuses on vectors, matrices and linear algebra. Sage include numpy and the chapter covers numpy in good detail. Chapter six is my favorite. I love plotting graphs, the chapter discusses various types of plots. The chapter does a great job explaining Matplotlib. Chapter seven is all about symbolic mathematics: integrals, differentials, ODE's, solving equations, finding roots, Taylor series and more. Chapter eight is about solving problems numerically and for me this is the best chapter in the book. It covers a variety of topics -- finding roots, maxima and minima of functions, gradients, integration, discrete Fourier transforms, window functions, solving ODE's. linear programming, constrained optimization to probability. Chapters five to eight are the meat of the book and I expect all readers to keep referring back to these chapters time and again.

Chapter nine is about advanced python programming, but I was a little let down based on what I had seen in chapter four. The chapter covers OOP, modules, exception handling and unit testing. What I did not like was the way the code is formatted and occupies a majority of the contents of the chapter. Chapter ten is about my favorite tool, LaTeX, it covers integration of LaTeX and Sage. No mathematical software is complete unless one can build interactive workbooks and the author does a great job explaining how to go about that business with interactive graphics and good typesetting.

Given the capabilities of Sage, the book fails to cover some of the discrete mathematics aspects, like graph theory, combinatorics and cryptography. To be fair, the author does mention in the preface the focus is on calculus, ODE and linear algebra.

Sage is a beast with several projects integrated under a single umbrella. This book meets the goals it sets out to achieve and does so in an incredible manner with clear definition of chapter goals, good summaries and excellent examples. The breadth of coverage of topics is very good for an introductory book on Sage. If there is one book I could recommend on getting started with Sage, it would be this "Sage beginners guide"

Friday, May 13, 2011

Slingers - More Lasit's?

In todays IPL match between Kings XI Punjab verus Kochi Tuskers, the Kochi blowers were seen imitating Lasit (Slinger) Malinga in their bowling action. Surprise, Surprise, is this going to become a trend soon?

Saturday, April 30, 2011

Match fixing (WC 2011)

I wonder if such controversies are created to make people believe that the losing team was too good for the opposition (winning team), but money got in the way.

Somehow, the WC 2011 win does not seem fixed, I remember seeing the joy on Mahela's face and the joy when the Srilankan's got to the half way mark. They thought they had won the match.

Allegations take away from the hard work of the players and glory. It sure is hard on players who are dedicated to the cause of their teams.

ATI driver 11.4 is out

It is here works perfectly well with my Fedora 15, beta system. I hate moving away from the open source driver, but I've got to do so for thermal (probably) and speed reasons (6x). Mesa has some interesting changes, including support for direct3D, but for now it is time for me to experiment with OpenCL :)

Saturday, April 23, 2011

Draft of Enumerative Combinatorics - volume I

Richard P Stanley has the draft of the second edition available at http://www-math.mit.edu/~rstan/ec/ec1/. The book is a classic and highly recommended if you are interested in combinatorics. The book assumes advanced knowledge of mathematics (commutative integral domains, generating functions, etc). I am reading the first chapter and I've been ignoring some of the rigor to get the most from it.



Friday, March 18, 2011

Knuth's Earth Shaking Announcement

I found the video here (http://river-valley.tv/tug-2010/an-earthshaking-announcement). It is quite awesome!! Earth shaking reminds me that I request all readers of this blog  wish Japan all the very best as the country tries to cope with the enormous loss and devastation.

Wednesday, February 23, 2011

Kernel Mode Setting and Resolution

The main pain of upgrading to rawhide on Fedora has always been -- "Hey, what about my proprietary graphics card support?". I've been bitten a few times. When I made the decision to buy a card, I chose ATI so that I can enjoy the benefits of a good open source driver.

Rawhide has moved to gnome 3, and gnome shell requires 3D graphics or falls back to the old style gnome. With kernel mode setting, there is sufficient support in the form of DRI/DRI2 and Mesa 3D to support OpenGL.

My main issue was getting the right resolution. Here is a well known way of solving the problem

Solution

  1. Run the cvt(1) command, specify the resolution and refresh rate, it will output a set of mode lines. See http://www.arachnoid.com/modelines/ for a good tutorial on mode lines (NOTE: You might not need to do this if EDID works fine for you)
  2. Modify /etc/X11/xorg.conf and add the following under the monitor section
  3. Modeline "...." (whatever cvt output)
  4. Option "PreferredMode" "Name of the mode used above"

This should get you going and help you come to the desired resolution

Solutions that did not work

  1. Adding video=... at boot time
  2. Disabling KMS, helps fix the resolution, but the correct 3D driver (mesa DRI) does not load, you are left to Software 3D emulation (that sucks)

Enjoy, I hope someday we'll get an open source driver for openCL :)

Wednesday, January 26, 2011

Distro Hopping

After trying some more distros, I decided to move to debian part-time. I was surprised to see Linux Mint support debian (albeit only the "testing", also known as "Squeeze" release).

I am in love with the combination of mint and debian. The version of the kernel is still 2.6.32, but debian stability and support is rock solid. I'll slowly migrate to the experimental version when "Squeeze" is released.

The rich packaging and stability of debian with the front ending of the very best makes this a lovable distro.

 I am posting some screenshots, enjoy!





Saturday, January 01, 2011

Happy New Year

Here is a hearty wish for a happier 2011, may the new year bring more happiness, health and wealth.

I want to make more resolutions, even if I break them - my new year resolution :)

Tuesday, December 28, 2010

Internet struggle

I've been taken back to my pre dsl days, thanks to the MTS MBlaze stick I recently acquired. The connection is best effort, speeds go down to a few bytes, forcing me to refresh a page at-least thrice before I can see it. All of this has made for a great vacation and bad experience. Sigh! I should have done much more research before acquiring a USB modem stick. I should probably move on to the 3G sticks available.

Wednesday, December 08, 2010

cgroup proposal for use in SLURM

I came across the following slides about using cgroups with Slurm. Very exciting to see cgroups be used more widely. For those of you who missed it, there is also a long discussion on autogrouping using tty's.

Saturday, November 13, 2010

FOSS.IN 2010 list of talks announced


The final list is here http://foss.in/talks/final-list.html#more-1674

There are some very interesting talks, I am speaking on "Operating System Caches in a virtualized environment". Please do attend

Wednesday, November 03, 2010

Fedora 14 is out


Get Fedora 14 from https://fedoraproject.org/get-fedora. The website has a great new look and feel, check out http://fedoraproject.org/.

Checkout some of the cool tools and features at http://fedoraproject.org/en/features/

libcgroup has been updated to  0.36.2, I'd recommend moving to 0.37 (it should be available soon)

I've been using Fedora for a long time and constantly since Fedora 11. I still remember seeing Fedora core 1 announced and Fedora core 2 shipped with the 2.6 kernel, wow! we've really come a long way! There is much more to cover.

Tuesday, November 02, 2010

libcgroup v0.37.rc released

We just release libcgroup v0.37.rc after about five months of development. There are some really cool changes, lots of bug fixes

cgconfigparser supports quotes
lots of bug fixes for tools (cgget, lssubsys, etc)
cgsnapshot is a cool new tool!

The release is available from https://sourceforge.net/projects/libcg/files/

As usual the home page is at http://libcg.sourceforge.net/, the generated documentation is at http://libcg.sourceforge.net/html/index.html. The source code (git) is  at http://libcg.git.sourceforge.net/git/gitweb.cgi?p=libcg/libcg;a=summary

Hack on!

Sunday, October 24, 2010

Some cool feature of firefox 4

firefox 4 is still under development, I've been testing it again now. A while back I tried it for its support of webgl, but I found gmail crashing and I submitted reports. I now see the new minefield (firefox 4) is quite awesome. What do I love about the new look

  • Group your tabs is a really cool feature
  • Refresh button has moved to the right
  • Book marking got a whole lot easier
  • When pointing to a hyperlinked item, the address bar shows what the URL of the linked item is (quite cool)
  • There is a new firefox sync in preferences to sync firefox across all devices
  • The web console looks interesting, but nothing to beat Chrome's developer tools

There are many more, these are what I could see from my first impression. I'll try and post some interesting screenshots. I've also heard that the firefox 4 javscript engine is now one of the fastest engines (really cool!)

On my wish list, I have

  • Better download manager
  • Ability to do private and non-private browsing in parallel

Saturday, October 23, 2010

Having fun with libvirt and qemu

I've been having some fun dealing with libvirt and qemu. qemu is the basic hypervisor that creates a virtual environment for execution and libvirt is the overall management library. libvirt has several checks built in to valid qemu and every-time, qemu changes (major version), libvirt fails or the default configuration needs tweaking (XML file).

Both are great projects, it is interesting to understand their architecture (which of course is way deeper than this post :))

Friday, October 22, 2010

Cgroups in use

I stumbled upon slides from the 2010 RedHat summit. Cgroups and Resource Management is introduced and mentioned.

There is also a great video on cgroups, really nice to see technology developed being exploited. The video is crisp and clear, do watch it now

Plumbers talk on memory cgroup

There have been several talks on memory cgroups in the past, I just found out about a new one at Linux plumbers by Ying Han from google. If you are at plumbers, I'd recommend attending her session

Sunday, October 17, 2010

Signal processing in sagemath

I was experimenting with some tools for signal processing. The first tools that come to mind are opensource tools scilab and octave. I spent a day looking at the tools, the UI. I figured I could do definite integrals quite easily. Having spent the day and not having the made the progress I would have liked to, I turned to sagemath.

My first delight was to learn about piecewise functions. I decided to play with a square wave of time period 20.

I started with a function that looked like

f1(x) = 1
f2(x) = 0
f = Piecewise([[(0,10),f1],[(10,20),f2]])

Plotting the function with plot(f) showed






Which is exactly what I wanted. Piecewise class also supports a number of very useful functions related to fourier series.

One particularly useful one is a plot fourier series partial sum. The function shows how as we add more frequencies the fourier approximation to the original wave gets better

I started with

f.plot_fourier_series_partial_sum(5,10,-20, 20)

f.plot_fourier_series_partial_sum(15,10,-20, 20) gave me



f.plot_fourier_series_partial_sum(150,10,-20, 20) gave me



This looks like a good approximation to the wave we started with and almost looks like the signals I got on my oscilloscope during my engineering days :)

The next important thing was to get the sine and cosine coefficients

print "sine terms"
for j in range(0,21):
    pretty_print(f.fourier_series_sine_coefficient(j, 10))
print "cosine terms"
for j in range(0,21):
    pretty_print(f.fourier_series_cosine_coefficient(j, 10))



sine terms
0
2/pi
0
2/3/pi
0
2/5/pi
0
2/7/pi
0
2/9/pi
0
2/11/pi
0
2/13/pi
0
2/15/pi
0
2/17/pi
0
2/19/pi
0
cosine terms
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
 
 
Overall, I had good day with sagemath. I need to experiment with some of the discrete functions. Keep tuned in, I'll try and keep you updated on how it goes.

Saturday, September 11, 2010

OLS 2010 proceedings

The draft proceedings are at http://www.linuxsymposium.org/LS_2010_Proceedings_Draft.pdf

I am quite excited about http://www.linuxplumbersconf.org/2010/ocw/events/LPC2010/proposals, but unfortunately I won't be able to attend this year. The other exciting event was KVM forum, I could not attend, but I am glad the proceedings are available http://www.linux-kvm.org/page/KVM_Forum_2010

Friday, September 10, 2010

Article in LFY

In this months issue of Linux For You, here is the abstract - I hope to continue to adding to this series of articles.

Power Programming—Bitwise Tips and Tricks
If you are a seasoned programmer, these tips and tricks will seem very familiar, and are probably already part of your repertoire. If you’re a novice programmer or a student, they should help you experience an “Aha!” moment. Independent of what you currently do, these tips and tricks will remind you of the wonderful discoveries in computer science, and the brilliant men and women behind them.

Monday, August 02, 2010

Quote for the day

The Art of Software Development is the tussle between being generic and specific. Generic at the time of writing and specific at the time of execution and vice-versa.
Balbir Singh

Saturday, July 31, 2010

Quote for the day

Todoing...  The art of catching up with TODO's, but never finishing them!
Balbir Singh

Saturday, July 10, 2010

Heading to OLS

It is that time of the year again, I am heading out to Ottawa Linux Symposium (http://www.linuxsymposium.org/2010/schedule.php), I am giving a talk on Page and Slab cache control in a virtual environment. I also look forward to meeting Paul Turner, Ying Han both of google to discuss cgroups (scheduler and memory). This year again there are loads of interesting presentations from Phase Change Memory to virtFS and beyond.

If you are coming over, it'll be really nice to see you there

Sunday, June 13, 2010

Things shook with pulseaudio

I had a interesting night as I tried to watch the wonderful USA versus UK soccer world cup match and debug sound on my Fedora 13 box. I tried executing the following command "paplay -v /usr/share/sounds/KDE_Window_Close.wav" as my monitor and chair shook. I got off and it happened again.

My sleepy eyes told me something was not correct, my brain told me it is pulseaudio shaking the room with the sound, but my ears did not agree. Well I guess we'll know what happened in the morning, was it a quake, who won the soccer match and will pulse audio work as expected?