Friday, June 14, 2013

One person's hack is another person's gem!

Most of us have probably heard the idiom: One man's trash is another man's treasure!

Even though I have heard this many times in life, I never realized how true this could be until a few weeks ago. I was attending a conference track, and the presenter, an Engineer working on a  great innovative product, was explaining the challenges the team faced while working on the product. During this presentation, the Engineer mentioned about a session timeout problem while using a very popular open-source product, and how a developer from the open-source product team helped out the Engineer by writing a JSP (Java Server Page) as a workaround for the session time-out problem. As the Engineer was describing how smart the solution proposed by the developer was, I couldn't help thinking why this solution couldn't be regarded as a hack. Having developed many Java enterprise applications myself, I just couldn't understand why a JSP was required to address the session time-out problem of two servers components interacting with each other. This is not to say that this solution is wrong, it's just that I wouldn't have solved it this way.

I have never believed in hacking myself out of a coding problem, however, there are companies and developers who believe in it and some even organize "hackathons" to celebrate their IPO launch. So now I understand that "One person's hack is another person's gem", just the way "One man's trash is another man's treasure". I guess as long as we enjoy what we build, hack or gem is just a matter of perception, and this is one of those things that makes the world go round.

Wednesday, January 9, 2013

Why is history so important?

When Einstein was asked "What is that one thing that should be taught in school?", he replied-- "History." Einstein didn't mean the history about a civilization, but the history of the subject that is being taught. If you are learning Physics, then you must learn about it's history, and understand how the field has evolved over time. As a graduate student at Santa Clara University, I remember a wise professor repeatedly iterating the same sentiment in a computational logic course. The professor kept reiterating--"History is important, it tells us why things are this way."

In my opinion, software engineers are notorious at ignoring the importance of history. I don't blame them, as I never had a subject that explained the software engineering evolution from a historical point-of-view. Just ask yourself--How many Java developers truly understand why it was created when another (dominant) object-oriented programming language (C++) was around? I bet that most universities and schools that teach the Java programming language never bother to explain what led to its existence. Java was created as a language for the web, and the main reason that it is such a success is because of it's "Write Once Run (or Debug) Anywhere" feature. The concept of having a Virtual Machine (VM) has really revolutionized programming; no wonder we now have many more languages that use the same concept.

In my opinion, to be a successful software engineer, it is important to understand the history of the technological evolutions. There are researchers--in academia and business--that understand this evolution, and they are the ones that are coming up with new technological advancements. Just something to think about then--people who understand history are the ones who have a place in it.

Thursday, September 20, 2012

GPU Computing

For a long time GPU processing has been synonymous with Graphics Processing Units, and the first thing that comes to mind when thinking about GPUs is computer games and the cool graphics. It is true that computer graphics has been a primary driver in the advent of these processors, but the GPU has now found other applications that benefit from the vast computing power provided by the GPUs. So in essence, GPU no longer implies the Graphics Processing Unit, but a General-Purpose Processing Unit. Compute-intensive applications in the field of Bioinformatics and Weather forecasting benefit from the tremendous number crunching capabilities provided by GPUs. This is not to imply that CPU or the Central Processing Unit is obsolete; in fact the CPU-GPU pair form a co-processor environment in which the CPU forwards all compute-intensive tasks to the GPU. GPU manufactures provide libraries that allow the programmer to indicate which part of the application logic should run on the GPU. The application binary then contains the appropriate instructions for the CPU to assign a certain task to the GPU for processing. The NVIDIA CUDA is one such library that is compatible with the NVIDIA GPUs.

A reasonable question to ask is: why have two different kinds of processors and why not just make one processor do everything? Both the CPU and GPU were designed with different objectives, so the CPU design makes it better for I/O tasks, whereas the GPU design makes it better for compute-intensive tasks. GPUs are gaining popularity not only in servers, but also in mobile devices. It is not surprising that the new iPad has a quad-core GPU and a dual-core CPU. With the increased emphasis on visualization and breadth-taking graphics, the GPU is expected to be the dominant, and perhaps the main processor, in a device.

Thursday, May 31, 2012

Engineer vs. Entreprenuer

What is the difference between an Engineer and an Entrepreneur? I can't speak about other engineering fields, however, in software engineering the difference is worth pondering over.

A smart engineer builds a great product to solve a technical problem, gifts the product away to the open-source community for the greater good, gets recognition in the technical community for the effort, and then goes back to being a salaried employee at a company.

A smart entrepreneur on the other hand, hires smart engineers to build a product to solve a consumer problem by using the technological advancements made by the open-source community, gets recognition among the masses, either sells the company or takes it public, becoming a millionaire or possibly a billionaire in the process.

Case in point - Doug Cutting developed Hadoop, a great distributed computing framework, gifted it to the open-source community, gained respect in the technical community, and went back to being a salaried employee. Whereas, Mark Zuckerberg built facebook by using Hadoop to gain massive scalability and reliability, gained world-wide recognition by building the largest social network, and became a billionaire after facebook went public.

Moral of the story: Become an Engineer, but think like an Entrepreneur!

Wednesday, May 16, 2012

The iConic Entrepreneur: Steve Jobs

People who love Apple products have grown to admire Steve Jobs as a great visionary and entrepreneur. Those who are intrigued by Steve's life and his numerous contributions should definitely read his book: "Steve Jobs" by Walter Isaacson. Steve Jobs did not have the perfect life, and perhaps this is why he strived to achieve perfection in his work by making products that are simple and intuitive. Steve was one of the rare individuals who understood that engineering is not just a science, it is an art as well. So, what makes Steve Jobs such a great entrepreneur? The first thing that comes to mind when we think of great entrepreneurs is that they are "great visionaries". However, having a vision is not everything, execution and timing are just as important. I read Bill Gates's book - "The Road Ahead" - in the nineties. In the book, Gates predicts that the web would evolve into an Information Superhighway and it would be accessible by a small device that is the size of our wallet. This wallet-sized device would cater to all our computing and communication needs. Even with Gates' vision, Microsoft never came up with such a product. It was Apple that launched the iPhone, which does what Gates had predicted. Where Apple succeeded - when Microsoft failed - was in the execution and timing. Under Steve's leadership, Apple executed flawlessly to deliver such a great product. With the IT world gravitating towards Cloud Computing (and SaaS), the timing could not be better. So in a grand scheme of things, execution and timing go hand-in-hand with a great vision. Steve Jobs had all three: great vision, execution and timing. This is why Steve Jobs is the iConic entrepreneur of our generation.


Friday, April 6, 2012

1c for the code, 99c for where you put it!

All engineers have probably heard this popular story at some point in their life: An engineer is called to fix a complicated machine, which the engineer fixes in minimal time by just replacing a screw. The engineer presents an exorbitant bill for the service, and when questioned by the customer, explains that the cost of the screw is only 1% of the bill, and the remaining 99% is for replacing the "right" screw.

It occurred to me that this story applies pretty well to the software engineering field. In the software engineering world, if I had a dollar to spend on a line of code, I would put 1c on the actual code itself, and the remaining 99c on the location of the code. Why would I do that? After all, as long as the code is working, does it really matter where it exists? The truth is that code added to the correct method, class and component makes a significant difference in the readability and maintainability of the code. Correct design ensures that the code is placed in the correct location, so the moral of the story is - to get the biggest bang for your buck, focus on the correct design and not on just getting the code to work. Remember, in a world with 9 billion people, there are probably millions who can write working code, but only a selected few who can design it correctly.

Wednesday, March 7, 2012

Enterprise vs. Cloud Computing

I recently found myself in a discussion where I was trying to differentiate between web computing and cloud computing. I was trying to make a point that these days all web-based products are claiming to be cloud-enabled. Anyhow, I later realized that I was making a wrong comparison. The web is in fact just a medium for product delivery; the comparison should have ideally been between "Enterprise Computing" and "Cloud Computing". In an era where "Cloud" has become the buzz word, most people are touting their web-enabled enterprise products to be cloud-enabled.

Enterprise and Cloud computing are two different things, the only thing common is perhaps that both are  web-enabled, which means that they can be accessed via the browser using an internet connection. However, there are many differences in these two technologies, and some of them are highlighted below.

1. Single-tenant vs. Multi-tenant: Enterprise solutions are generally single-tenant, which means that each customer or enterprise has its own deployment. Cloud solutions are multi-tenant, where the same deployment supports multiple domains (customers or enterprises).

2. Scalability: Enterprise products are expected to scale from 10s to perhaps 1000s of users, whereas Cloud solutions need to scale to millions of users. So whereas an Enterprise platform may be scaled vertically by beefing up the server hardware, Cloud platforms generally rely on horizontal scalability by increasing the number of processing nodes in the cluster.

3. Performance: In an Enterprise platform, performance may be improved by having  multiple processing threads; however, cloud platforms improve performance by processing on multiple nodes in parallel. Therefore, Cloud platforms require a distributed processing and coordination framework, such as Hadoop.

4. Virtualization: Enterprise products generally use dedicated resources - servers, storage devices etc. Cloud-enabled products, on the other hand, use virtualization to share hardware resources.

5. Access Control: In an Enterprise platform, access controls pertains only to user access control, whereas in Cloud platforms, access control also applies to the resources shared between the multiple tenants.

I am sure that there are other differences between Enterprise and Cloud computing, so this is certainly not a comprehensive list. The objective is primarily to get the product architects thinking in the right direction. I hope you found it useful.