Posts

Practical C++ Error Handling in Hybrid Environments

Orig Article Link:   http://www.drdobbs.com/cpp/practical-c-error-handling-in-hybrid-env/197003350 Exception-safe code is notoriously difficult to get right in C++. Still, it is the recommended way to go, at least according to C++ gurus. And for a reason. If you write nontrivial programs or libraries in C++, you should probably study exception handling and use it where appropriate. In the real world, however, exception handling is not always possible, viable, or used by anyone. So what do you do if you need to integrate or interoperate with software that doesn't use exception handling? In this article, I discuss situations where exception handling is not used and why. I then demonstrate how to interface your exception-handling code to other software components that practice a different error-handling method. Error-Handling Strategies in C++ There are different ways to report and handle errors in C/C++. (You have to consider C because C++ is—more or less—a supe...

Elementary's AppCenter Application

Image
Elementary's AppCenter frontend looks good. Hopefully the development and feature addition will be speedy. p.s. Elementary shares the backend for AppCenter, the libappstore with lubuntu project. Great collaboration!

AIMP vs WINAMP

Image
AIMP is awesome. Its got nice interface. Its bloody fast n very light in system. Its even got good DSP n shitload of features. But it still can't beat my current favorite combo of WinAMP plus Jammix Enhancer. The phenomenal audio quality that this combo generates is unrivalled. :P

The six w's

Image
Journalism has a principle. Its called the principle of five W's. It means when you are covering any incident you must cover the What's, Why's, Who's, Where's, When's, and How's that incident. I have found out that if we add a Start and End to this then I can effectively use this in my everyday life to get proper info about things to do and save some falling on face to me. So I have consciously tried to use this small methodology for last few years and the results have been great. These basic questions have propelled me in correct direction to concise and complete information. Oftentimes I wondered what's the significance of this particular thing that I'm working on to my organization. And thankfully these questions have steered me to the correct path and providing me the correct value of my work which has given me much morale boost.

A search for the perfect Linux distro

I have known about Linux since 2003. I have tried a number of different distributions and I have found many amazing things about each and every one of them. But sadly none have been the ONE distro. The longest I have stuck with was Ubuntu and that would be about three years. The second longest is elementary is which is the current distro of my choice. My criteria is simple - the OS has to be lightweight and fast. Things should work out of box with respect to hardware. There should be enough settings. And the UI must look polished enough. For a time Ubuntu worked perfectly. But after they introduced Unity I kind of lost it with them. The lack of settings, the lacking performance and the overall unfinished nature made me dump it. Right at that time elementary 0.2 was made available as alpha. And being adventurous I got on board. Till now elementary is working fine. It has the polish, the speed and the configuration options also look good. The problem is with applications. The applica...

Catastrophe

Forgot to put "&" in front of a line in /etc/rc.local and that caused rc.local to hang, which caused no X server! Awesome goofup!

QCalendarWidget CSS Stylesheeting

Recently I had to implement a calendar for a TouchScreen application. I resorted to css to modify the calendar widget's appearance so that it would be more accessible. Following is the code that enabled me to get a proper calendar. calendar->setStyleSheet("QMenu { font-size:20px; width: 300px; left: 20px; }"     "QToolButton {icon-size: 48px, 48px; font: 20px; height: 70px; width: 100px; }"     "QAbstractItemView {selection-background-color: rgb(255, 174, 0);}"     "QToolButton::menu-indicator{ width: 50px;}"     "QToolButton::menu-indicator:pressed,"     "QToolButton::menu-indicator:open{ top:10px; left: 10px;}"     "QTableView { font: 30px; }"     "QSpinBox { width: 100px; font: 20px;}"     "QSpinBox::up-button { width:40px;}"     "QSpinBox::down-button { width:40px;}");