Saturday, February 2, 2013

Elegant Programming Language?

In a recent thread I was participating in the inevitable language A is more elegant (better, pick another adjective) than language B sidebar broke out. I did not directly participate in this sidebar as this topic does not really fit my world view of the subject.

Here is why...

While I agree some hammers are better than others, ultimately the hammer is as good, bad or somewhere in between depending on whose hands it is in. And to this you may argue that the very best hammer in the hands of a great carpenter is ideal. I would not disagree. But, if you argued that same hammer in the hands of a klutzy homeowner makes them better, that to me is a much tougher sell.

Of course languages are a tad more complicated than my hammer analogy. As I have watched the evolution of programming languages we try to create that "silver-bullet" language but we invariably miss the mark. Likely we always will, though by no means am I suggesting that we stop trying.

Take Java for instance. Some of the filthiest most convoluted code I have seen in any language has been produced in this language through the gross misuse of interfaces. Simply put an interface in Java is an abstract concept/template that requires the implementer to define all of the underlying method stubs (to use a term all can understand) at design time.

Without diving too much further into this subject I want to add that knowing all the methods one will need for a given interface at design time that will hold true for the use of an interface through the software development lifecycle is a difficult thing to determine. Further, an interface establishes a contract with the user of the interface that says if you want to use my interface you need to declare all the methods that are in the interface in your class whether or not you intend to use them! If properly created an interface creates a piece of coding elegance that allows one to achieve both polymorphism and encapsulation at the same time. It also create a uniform consistency across the users of the interface.

Polymorphism is a rather obtuse terms so let me offer an example. I want to implement an interface for a heating control thermostat. It will have two methods, 1) check temperature, 2) change temperature. Polymorphism is a concept that essentially says I do not care what type of heating system I am connected to (Natural Gas, Electric, Wood, Coal) these two methods are applicable and work exactly the same as far as the interface consumer using them is concerned. It is elegant in the respect that the user does not have to be concerned with the underlying implementation details as to how these methods interact with the varying underlying infrastructure.

An interface when properly constructed can be a zen-like thing of sheer beauty and elegance... that is until I need to add a new method body to the interface.

The moment I deploy an interface for others to use I essentially am locked into a contract that does not allow me to extend the interface without breaking the code of those that are using my interface. So what ends up happening is a) I just brazenly extend my interface and tough luck to you, go fix your code, b) I end up deprecating my interface and creating a new one which adds more complexity to the API, c) I extend the interface by adding abstract classes and other interfaces beneath my interface that can more times than not end up being ravioli code (The OOP version of spaghetti code).

I can tell you (and frankly if you are a Java program and are being truthful you can tell me in return) countless tales of encountering many "nightmare on interface street" scenarios. But, I still think an interface is an elegant programming construct. I also contend that an interface in the hands of someone that does not understand how to properly implement one is anything but elegant.

Now, as another much quicker example. I am a big fan of Php. Many developers like to bash the language for not being elegant. I have written a great deal of elegant code using that language. I would also admit that Php does have a number of warts and omissions. As a notable omission, I am huge fan of overloaded methods/functions. I think it is one of the most elegant programming abstractions ever invented. What one has to do in Php OOP to achieve an overloaded method is so convoluted and unnatural it is essentially not usable. Not at all elegant.

So I pose these questions as food for thought.

Can we say a programming language is not elegant because hacks can come along and use it in a way that was never intended?

Can we say a programming language is not elegant because it is missing features and functionality or has some warts or anomalies as it evolves over time?

Elegance and beauty always remain in the eye of the beholder. I have seen elegant code written in Cobol which I do not consider an elegant language. I have seen monstrosities written in Java which I consider an elegant language.

In the end we will continue to have these discussions, and developers will continue to invent new languages that are meant to be the next panacea. This all is a good thing.

Thursday, January 10, 2013

Integrity, Relationships and Our Customer

This is the foundation for all business. Prosper here and you will succeed.

I want to tell you a story. This took place over twenty two years ago, back when I had hair. It is a conversation I had with a colleague. I honestly do not remember his name, but his words have stuck with me all these years and serve as the foundation for how important relationships in business are. Though I have to confess I have stumbled and fallen many times along the way in this area.

He told me a about a prospective customer that had called wanting a quote on a couple of capnography units. At the time this product was experiencing some major problems. He disclosed the problems we were currently experiencing and then referred the customer to the vendor that was "best in class" for that product. He told me the customer was somewhat stunned by his actions (go figure ;-}).

My colleague then told me, "Eric I have been the sales person of the quarter for five quarters in the past two years. My management always asks me to share my secret and I try to tell them but I do not think they understand. In fact, if they knew what I did with that customer I might very well have been fired".

Two months later he told me the same prospective customer called him and said he wanted him to write up a purchase order for twelve of our portable EKG monitors (We were best in class at the time in that product area). The salesman told the prospective customer he would send him a quote. The customer replied "I do not think you heard me, I want a purchase order, not a quote."

This is a true story, one I have never forgotten, though I have long forgotten the salesman's name.

The message of the story to me is very clear. Integrity, honesty and building relationships with our customers are what matters most in business and in life. I am not talking about some rah-rah statement that every company has. I am talking about walking the talk.

It does not matter where you are in the organization, we all have customers we serve. I would like to expand for you the definition of customer. My manager is my customer. The analyst I take the time to answer a question for is my customer. If you are a developer that lives behind what I like to call the "wizard of oz" curtain your customer is the designer asking for a function point that will help the customer that is paying all of our salaries by buying our products and services.

A customer is anyone we serve in any capacity. Remember and practice this and your life will be rich and meaningful because you will have built many quality relationships. Remember this as a business and while I cannot guarantee your success I can guarantee the health and wealth of your soul.

Think about how you have served your customers. How would you write about this in your LinkedIn profile? What would your customers say about you if you asked them for validation?

For many of us these can be sobering questions I just asked. But hard questions help us all to grow and try to do a better job tomorrow.

Also, remember, if you never fall down then you are not skiing hard enough.

Peace out.

Monday, January 7, 2013

Human Currency

I am not quite sure why this has not been written about more. You and I make up the new currency in the modern world. One need only to look at the success of Facebook, LinkedIn, Twitter, and YouTube to understand the profound truth in this observation.

These enterprises are each worth billions. They offer us, in exchange for our membership, a place to commune and communicate. A place to share ideas. For some a chance at our proverbial "fifteen minutes of fame."

If you ponder this new equation for currency long and hard it really is television in reverse. McLuhan said "The message is the medium." The message used to be all of us with our butts parked in front of the TV in our living rooms. The medium was static and was delivered to us from a one way cathode ray tube. We watched it. Of course we had (and still have the choice) to pick up the remote and surf down the dial.

Today, you and I have become the medium. Instead of watching, we are the ones being watched. Every tweet, every profile update, every post, every search recorded.

Now, I don't mean to be a downer in saying all of this. Truth be told, I am quite engaged and excited about these new mediums. They offer all of us a voice. They allow those of us that have become disconnected by time and space to re-connect. They can even serve populations that are less fortunate than us. Level the playing field if you will.

The ultimate delivery of what we once called web 2.0 really has turned the flow of information from a one way stream that only flowed from a singular static source into a two way street. We, collectively have become the main source of information and data. I can say that I have become a richer person thanks to the web.

Of course we all must also be brutally honest with ourselves and accept that we really do not have a choice to disconnect from the new medium. At least not and remain a viable member of todays society. As such it is our collective responsibility to ensure that the medium never becomes too invasive or oppressive. After all, we collectively represent the new currency.

Tuesday, November 20, 2012

"Big Data" - What it is and Why it Matters

Thanks to Google, Facebook, Linkedin, Amazon and many others we have entered the era of "Big Data."

 

What is "Big Data?"

  • It is Google slurping-up the entire internet each day so we can ask it things like "Best pizza in New Haven" and get an immediate and credible answer.
  • It is Facebook with their one billion users who generate 500TB (yes, that is 500 terabytes) of data per day.
"Big Data" is managing data on a scale that is, frankly, hard for many of us to imagine.
Today managing massive volumes of data is a reality through the ability of software to spread the data across many low cost commodity servers. When I say many I am talking about thousands!

At its core "Big Data" involves the same set of core actions that can be applied to any type and size of data. They are:
  • Collect the data 
  • Store the data 
  • Access and consume the data subset that we desire
  • Analyze the data
You do not need to be a “data geek” to wrap your head around these four actions. Most of us do these things on a personal level as part of our daily work. The demands and variations of how people and organizations want and need to consume data make doing these four actions a technical challenge. Now add to this data volumes on the order of hundreds of terabytes a day and the problem becomes exponentially daunting.

Additionally, think about all the input sources we have for data these days. Excel spreadsheets, Word Document and Powerpoints sitting out on network shares. Email and IM, Tweets, Social Media... the list goes on and on. We all work with this type of data on daily basis. We also use internal software sytems for ERP, CRM, Accounting, etc... . All of us from the cubes to the glass corner offices struggle when it comes to collating, managing and using this data to our best advantage.

 

Two Essential Components to "Big Data"

There are two essential components to "Big Data" systems.
  1. There is the "Big Data File System." We need a means of slurping in all of this data and spreading it across many servers so we can process it in parallel. Think Moore's Law in reverse.
  2. We need a means of querying it and getting back the subset we want to process. Enter into the equation a process Google terms MapReduce.
In simplest terms, MapReduce is a framework for parallel processing massive amounts of data in the shortest time possible. For example, it is possible today to process one petabye (1000 Terabytes) of data in a few hours. And, when I say process I mean make it ready for second stage consumption.

 

Answering Your Questions (Back to Pizza)

You are able to get a quality answer to your pizza question so quickly because Google has mapped all the web pages of the planet and MapReduced this data into indexes that can answer such questions.

What if your business could do the same?

Well it can.

Today there are a number of "Big Data" solutions on the market. Many are open source. The biggest one in the mainstream today is called Hadoop. It essentially is the open source version modeled after the Google File System and Google MapReduce. Hadoop was created by a guy named Doug Cutter. After reading the Google white papers on their file system and MapReduce Doug set off to replicate Googles’ work in open source. Sigh... if we could all be this brilliant

And, there are services by giants like Amazon (EC2) and Google (BigQuery) that are "Big Data" service providers.

 

Mind Blowing Data Fact

90% of the electronic data in existence today did NOT exist two years ago.

You can translate this little tidbit to mean "Big Data" is not some passing fad. It is the wave of the future. "Big Data" has finally made its way into the mainstream and is today solving massive scale data problems that SQL and relational database management systems just do not have the capacity to deal with. A special note to my friends and collegues that live in this world. I am not asking you to abandon the RDBMS ship. But y'all need to come over to this side of the water and dip your toe in to see how it feels.

"Big Data" - What is Possible (Dreaming in Data)

Imagine slurping in all your corporate data including crawlers that search social media sites collecting what people are saying about you. Then imagine being able to query that data to ask natural language questions such as, "What are the customers saying about our product and services relative to the competition?" ...or... "What are the aggregate pain points for “x” so we can get into that market segment or solve the problems the marketplace faces?"

Think how much quicker you can respond to market forces and increase your bottom line. And, better serve your customers and your shareholders ;-).

“Big Data” is more than just feeding the corporate bottom line. It is more than just data collection and evaluation on an Orwellian scale. “Big Data” is going to allow the next Facebook to rise. Imagine a world education portal the size of Facebook (or potentially larger) where students came come to learn from anyplace at any time. Where teachers can congregate and share best practices and do what they love most: teach. Imagine a portal for artists, writers, and musicians that has gallaries where they can share there work with others in the world. A site loaded with virtual museums and concert halls that integrate 3D technologies.

This is what I mean when I say “dreaming in data.”

You and "Big Data"

If you are a business of any size and "Big Data" is not on your radar it should be. Todays "Big Data" solutions can work just as well on medium and small data.

If you work with data, and most of you out there work with data, you need to be asking your leadership when they are going to invest in "Big Data" solutions.

If you are a development house trying to still fit every problem you have into a relational database and doing it using object oriented data you should be asking yourself why aren't we also using NoSQL product like MongoDB as part of our core technology strategy for backend development.

So as not sell you a bag of Fools Gold...

I trust I am mostly preaching to the choir on this next point.

Collecting, managing and analyzing data is hard. I do not want to you to think that you are going to go out to Apache, download Hadoop, setup a cluster of twenty rack servers in your data center, slurp in all your data, write all the MapeReduce code and have answers to your most pressing questions by the end of the week.

Like any implementation this is going to take you some time and some coin. Hadoop will not cost you a dime. The companies that can help you implement a "Big Data" solution will cost you many dimes. You will also need to involve key staff members that understand your data to be a part of this journey. Finally, you will need an experienced architect that can strategically lead you into this new frontier that is rapidly changing how we do business on this planet.

Who is Into "Big Data" in Big Ways

Here is a partial list of who is involved in implementing and using "Big Data" (Like Hadoop and MongoDB)

  • Craigslist
  • SAP
  • Disney
  • CNN
  • Amazon
  • eBay
  • H-P
  • Apple
  • Microsoft
  • etc...etc..etc...

What are you waiting for… to be left in the dust?

Tuesday, November 13, 2012

The Next Linkedin/Facebook...

I don’t know what the next LinkedIn or Facebook is going to be, but I do know what one of the next LinkedIn or Facebooks is going to be.
 
It will be just as big,and actually could even end up being bigger than Facebook in terms of end users.
 
It will cross borders and countries, and it will change the face of the planet as we know it today in a positive way.
 
It is going to be an education destination where anyone can come to learn anything at anytime.
 
Education without bureaucracy, education without borders. It will be both synchronous and asynchronous. It can be instructor led, it can be self-paced. It can be for profit, and it can be for free.
 
It can and will ultimately be all of these things and much more than we can even imagine today.

Wednesday, October 31, 2012

HTML5 is Worth Your Time

Though all the features are not close to being 100% cross browser, and while I have only scratched the surface I think HTML5 is real game changer. I certainly am excited thus far with what I see.

Web Storage is a great new feature that is essentially cookies on steriods. Actually comparing it to cookies is a bit of a disservice. In a nutshell web storage is a hash (associative array, aka key/value pairs) that you can store persistent or per session. The most interesting to me is persistent, though this term is a bit of a misnomer as the cache is only persistant until one clears out their browser cache. Session can also be useful for maintaining page to page context where you do not want to make a trip back to the server. In general I think it is still going to be appropriate to maintain session and persistent context server-side, but this really is a nice option for certain development scenarios.

Client Side SQL DB - I have not done anything with this one yet, but it the feature that excites me the most. A client side database you say... what for? Being able to put a database on the client opens up a wealth of possibilities for resident apps. Yes... yes... I know we are entering the age of the cloud (which also is very cool and about time) and 24/7 connectivity, but the possibilites for pc or tablet apps is very thought provoking indeed. Especially coupled with the new file system api's. Think Dropbox on a much broader and grander scale!

I also like the new audio and video tags, though there have are means of doing this for some time.

When you couple HTML5 , CSS3, and killer libraries like JQuery one can really begin to build some wicked apps.

I started working with HTML a month before they implemented tables (seriously). We could only dream back then. Today our only excuse seems to be our own lack of imagination :-). For someone that has been riding the web train since Clinton was President these are some very exciting times to be doing web development.

Thursday, October 4, 2012

These are merely tools we use

My email tag at GE says "It is not about the tools, it is what the carpenter does with them."

If only I had a better set of golf clubs I would be a better golfer. More times than not this seems to be our mentality in technology. The technologies we use are nothing more than tools. What we craft with these tools is up to us, our imagination, skill... and of course our collective ability to communicate and to work and play well with others.

Twenty years ago we had to limit our imagination and consider things like can I really afford 3k for that image in my webpage? We needed to do all sorts of contortions to build web content. Web applications were something we only dreamed about. We were cave dwellers trying to build a civilization with stone tools. Ancient civilizations can do some pretty amazing and resourceful things.

Today we are only limited by our imagination and ability. The tools we have to work with are powerful. The languages expressive. Inherent context management for our pages with a single directive. Powerful, scalable resources that are easy to implement and develop in. Answers to our current woes just a google away. It is a great time to be a software developer.

It seems we have moved past the "if only I had this tool I could..." phase. This is good because I have never been much for excuses.

Todays biggest challenge is to be able to store singular data on the backend and to interact this data with the front end user experience irrespective of the device: PC, Laptop, Netbook, Tablet, Smart Phone.

Well, what are we waiting for?