Monday, March 11, 2013

Are you a Human Resource or a Personal Brand?

Sculptors, architects, artists, entertainers, actors, designers, etc., already do this: Each of them have become a brand, a personal brand. They endorse their product/services with their name.

What about them makes them different from the rest of the population? They are not a (human) resource, but a personal brand.


What is a (human) resource?


A (human) resource is a person (preferably human) whose knowledge and expertise can be extracted to the benefit/satisfaction of the resource owner. To get the best out of the resource, the resource owner will "feed" the resource by providing tools, facilities, etc., necessary for the function of the resource in order to get what the resource owner expects and more.

Based on the statement mentioned above, one can see that slavery hasn't changed much over the years. Instead, you get paid for your knowledge/skills.

In order for the human resource to remain relevant, he/she has to remain knowledgeable to the skillset demanded by the resource owner and the market. If you've been hired to be a carpenter and if new tools/means are available to be a better carpenter, it's up to the resource to find a way to expand/grow with the new tools available. After all, the resource owner expects 200% from the resource, else a new resource will be required and the old resource becomes "garbage" (if you're a developer, you totally understand what I mean).

What is a (personal) brand?


Personal branding was introduced by Napoleon Hill in his 1937 book "Think and Grow Rich".

A personal branded person is a person who is marketed as a brand. This person is a unique self-package (containing identity, services, products, etc.) that is identifiable and marketable. Think of any of your favourite music artist/actor. Why do you follow them or buy their CD or DVD? That's because you know their brand and you identify to that brand that whenever their brand are on market, it attracts your attention.

A brand is an asset, etc., which has a unique identity that contains a established history/portfolio, which the stakeholders identifies to, and has a goal to benefit the brand and their stakeholders. A stakeholder is someone who identifies to your brand and is involved to the brand. E.g., there are many soft drinks products in the world, but many identify to Coca-Cola than Pepsi. The buyer of Coca-Cola are stakeholders to the Coca-Cola company.

An advantage to a brand is that it has history/portoflio. This is crucial as your stakeholders can see the thinking process that undergoes in a brand. This thinking process is not easily identifiable from a human resource, hence why when hiring a resource there are interview process to identify how the "resource" thinks.

Also, an advantage to a brand is that the stakeholders looks for the brand, not the brand looking for the stakeholders. This means that you don't chase money, money chases you. A human resource, on the other hand, needs to find an owner that will hopefully use his /her resource.

Don't be fooled, once you become a brand, it's all hard work from now on since you have to remain relevant as your competitors can eat out of their shares. Hence why a brand has vision. A vision to keep relevant now, tomorrow and hopefully, forever.

Advantages of being a personal brand?


Being a personal brand has its many advantages compared to being a resource:
  1. Your reputation precedes you. When your stakeholders sees your name, they see your history, they understand your work ethics, process, creative genius and knows what to expect from you.
  2. You know your nett worth. That is a plus since you can negotiate higher and not lower. A resourceful person cannot quantify as "accurate" their worth.
  3. There is a sense of individuality and uniqueness in the mind of others. Unlike a human resource who markets themselves through CV (and hoping they can identify a unique proposition that brings value to the employer), a branded person continuously creates awareness of their product/services to their stakeholders such that they don't see just uniqueness in your product and services but uniqueness through the brand itself.
  4. You are constantly creating a road-map to success. Don't get me wrong, everyone in their lives have a goal. The problem, however, is that human resource don't put focus too much in their goals as the personal brand. A brand is always aware of competition and, for survival, they always have to be an expert in their field or they "die" down.
  5. You leave a lasting impression. A stakeholder follows their brand in every sense of the word. With today's social media, it's even simpler to follow. When your stakeholders have positive lasting impression of you, it builds credibility, respect, admiration in such a way that it becomes a referrals to other stakeholders.

How does one become a brand?


Before the realization of the internet, in order to be resourceful, one had to invest their time, money and effort in getting qualified in a particular sector and, every few years, upgrade themselves in order to stay relevant. That's what every human resource does if they still want to be relevant to the business. This is measured through a Performance Appraisal.

It's now simpler in modern days technological world. You don't have to hire a branding agent to market yourself. Start small. What some do today is to create a blog and create an identity in their blog. Be involved in community projects, whether it be online projects or community-based projects. The main idea is to create relevance and reputation about you, who you are and what identifies you as a product and service for others to be able to follow you as a brand.

I hope I have got my case across. The more you work to become a brand, the more you will realize your strength and value proposition you can provide (as yourself) as a product/service and, finally, know your nett worth.

Thanks for reading this post.

Wednesday, February 27, 2013

Skanky exception, a dirty exception handler.

There was an interesting question posted on StackOverflow (asked on 27 February 2010) about programming Jargons (New Programming Jargon you've coined). The question was, subsequently deleted due to not being a question. Jeff Atwood blogged the top 30 answers from the deleted post here but if you have reputable score on Stack Overflow can view the deleted question here

The interesting jargon that I fully agree with is the Pokemon Exception



Pokemon exception is when you surround your statements with try-catch and  catch all exceptions. In Java, all exceptions are caught by catching java.lang.Exception.

This, pokemon, exception can transform to a new exception I call Skanky Exception (not coined by me, but from a work colleague). A skanky exception is an exception, thrown from the catch block, that contains has no reference of the actual caught exception. Let me elaborate via code example:




The skanky exception is on line 8. This is a dirty way of throwing an exception as doesn't encapsulate the thrown exception as a cause. Instead, it requires the developer to create a test environment, identical to live evironment, and recreate the problem step-by-step. If this is a severity 1 (critical priority issue), imagine the stress levels and coffee uptime the developers undergoes to find the actual root cause of the problem.
This was coined of the phrase we tend to say, "she swallows and likes to give bad head. A dirty exception.".

I was, initially, going to post this on StackOverflow but since the question/post was deleted, I decided to blog this instead.

What are the other jargons you've coined or did you come across, that hasn't been listed on links I've provided? Let me know by commenting below.

Thanks for reading this post. 

 If you haven't noticed, I posted this post exactly 3 years after the original question asked on StackOverflow.

Sunday, January 20, 2013

The future of software developers.

Happy New Year to everyone. May this year be a year full of challenges, hard-work and success in every goal you've subscribed to accomplish.

As a software developer, I have to always try to keep up-to-date as the software industry is growing at an alarming, and (doubly) exponential rate. This is the reason I'm always on StackOverflow: the question asked by other developers worldwide shows how software are evolving. If a developer misses the train of evolution, they will get frozen in the ice-age period of "This is how we used to..." mindset.

Now that I got the pleasantries out the way, I've decided to write this post on an observation seen from the many years spent as a software developer.

Being an "old school" developer, I have programmed with legendary API's, from WinAPI (Windows API) in Delphi, C and C++, to JDBC API in Java. Each language I've used, in my years of as a developer, shipped with API bundled in the Software Development Kit (aka. SDK). These API's gave developers the freedom to develop absolutely ANYTHING, based on their requirement/imagination. There was virtually no dependencies as the API existed in the SDK.
















Times have changed. API's exists in a new model called Frameworks. This, unfortunately, results in fast-brewing a new generation of developers that I call the "component assemblers/integrators". They are very fluent in downloading frameworks, libraries, software modules and integrates them together to form an application that they can deliver to business. If there are issues during the assembling (and in assembling, I mean assemble through code) and/or integration, they are quick to Google for solution/answers or ask question through StackOverflow. You can recognise them well, they post a question with a full exception stacktrace from 3rd degree exceptions.

My thought on the new generation programmers.

Today's developers have what we didn't have back in the day: A wide variety of platform independent programming language, too many (open source) frameworks to choose from and web services that are easily found through some UDDI registry or an easy Google search. 

There are advantages and disadvantages to these programmers:

Advantages:
  • They are mostly the creative bunch. Today's frameworks/libraries/applications, etc. are designed to make development time faster and simpler. This allows that development time are spent  building applications and also have fun doing it. This fast learning curve gives rise to creativity in broadening the horizon and bringing new features and new technologies rises. So, the vicious cycle continues.
  • They release product quicker. There are too many API's on the rise to make product integration easier. No need to know how the internals actually communicate between protocols as long as the request send and response received meets your requirement, everyone's happy.
  • Frameworks have a fast learning curve than traditional API's. This is due to the fact that pre/post conditions of using frameworks are lesser than API's and exceptions are "generally" well handled.
Disadvantages:
  • They lack knowledge of internal systems. if you take those who know JPA and Hibernate, most likely they don't understand fully the JDBC API and how the Hibernate framework works internally. They tend to reference a Hibernate/JPA book when issues arise.
  • Debugging is not a strong skill. They haven't been exposed to API when wrong values caused a segmentation fault and a good debugger such as gdb (if you've been a C++ programmer) is a skill. Once stuck in an issue, they are quick to log a issue bug to the company responsible of the framework they use or ask the question to Q&A sites, like StackOverflow.
  • Chances are, they might not be able to write a framework themselves. I don't think they are those people who can write a proper Servlet other than using a @WebServlet annotations (Java EE 6 and higher).

Ask them how the SOAP protocol works and you get an answer like: Get a WSDL, generate client code and write a Service to call a method and bob's your uncle.

I asked one colleague about how to calculate date difference and the first thing I got is to use Joda time. Gone are the days on learning the Date object and doing proper date calculations.

Are they to be blamed?

No! In today's job market, many companies post (development) jobs with requirements that is no more language specific but technology/product specific. A Java developer, today, should know EJB 3, must know any persistent/ORM framework availble (such as Hibernate or JPA), know Business Process Management (BPM) and create/develop using BPMN (like jBPM/Activiti), and know Web Services (RESTful/SOAP).
SOA architecture have taken rise to the IT world, as we see that Cloud Computing, Application in the cloud, and clout services are taking the norm.

If you can't think or find a library that solve a problem on the spot, chances are you won't fit in the modern day programmer.

And what happens to us?

We, the old school developer become Application Support Specialist. We maintain and support outdated but fully functional applications which makes the company its revenue. Are these applications going away? Not likely, but we are not considered in the frame as these new component integrators. Think about it this way, mainframe developers still exists today. They are only available to support the ancient mainframe applications and do few enhancements but don't expect to see a brand new system completely written for the mainframe system.

So, if you decide to further your development career, you should ask: Am I willing to provide service solutions to business or be a technical expert and stay in the daisy wheel of an Application Support Specialist?

Thursday, March 1, 2012

JOAuth 1.3.1 release.

My apologies for the extremely late support and code fix. I have been working on my employer's new project. Seeing that they want to include OAuth on their application, I thought it was a good time to update this library. Hopefully this will be my final JOAuth release (as I've decided to move forward to creating an OAuth framework).

JOAuth 1.3.1 is a release to conform to RFC 5849 strict. This allows OAuth to conform to Strict OAuth Service Providers, such as LinkedIn (which conforms to OAuth1a specification).

The code has been simplified, fixed and included support for HTTP parameters with multiple values (on a key).

I have demonstrated (below) a simple example on how OAuth 1 can be done (using Twitter, of course, as well as Facebook) to retrieve authorization tokens. The former uses OAuth 1 (lenient), while the latter uses OAuth 2 (draft 0). It's up to the developer to understand the OAuth authorization flow.

I hope that you enjoy using OAuth library as much as I had fun working on the fix. JOAuth still has the service to receive authorization tokens (just look at the joauth tag on StackOverflow on how to apply it on yours).


If you have used the previous version of JOAuth, please update your code errors, as some methods on the consumer (particularly OAuth1Consumer) has changed. Oh, did I mention that I Mavenized JOAuth? :-)

Download here.


Enjoy!

LinkedIn Example:



Facebook Example:

Friday, February 24, 2012

Job Security: Threatened by a smarter, junior, employee.

In this economic times, I understand that job security is an absolute worry that consciously/subconsciously brews in everybody's mind (those that are/want to earn income). Oftentimes, this worry brews so hot that it bubbles from a charming man/woman to becoming a hulk. In my case, this hasn't happened (at least, not yet) but I think that is becoming a worry.

The wonderful, true fairy tale story:

Let me elaborate: A company hires a smart, junior, software developer, who has plenty of potential, brilliant ideas and he/she is not afraid to speak his mind about what he/she believes. His/her nemesis (of which the new guy/girl doesn't know about, yet), the experienced senior developer, decides to groom the junior person to learn development best practices and, most importantly, the business.

Over time, the new person becomes valuable to the company: He produces brilliant code, the company's investment on him/her brings results and ROI is good (how to calculate ROI on the employee is beyond the scope of this blog). Now, he has power to object on his senior's decision in problem-solving. 

Sooner (than later), he/she realises that he's mostly on support calls, doing bug fixes and user maintenance of the system application. He's less involved in the new business functionality and he/she finally realises that he thoughts of being a software developer is not what he/she dreamt it was/is.

The nemesis? You've already met him/her. He/she comes to you, once in a while to see if you're working and are busy and you have to kiss his/her behind (as well as his/her manager's). After all, you're getting paid to work, right?

Isn't this frustrating? After years of realising that your skills is being wasted, you decide to leave and you part ways and hope you never come back.

The question is: Why would your "hero"/mentor suddenly become your (unbeknowned to you) nemesis? The simplicity, that I found is this: job security.

Job Security:
 
Job security is the only things that keeps us breathing in this economy. Have you wondered why the sucker colleague, who pleases the manager all the time, climbs easy in the corporate ladder, whereas, you & I, the smart person who has good ideas to bring forward, sits in the "corner" of your desk and screams internally, and hope that someone upstairs might listen?

In South Africa, the "poor" people, who lives by "means-to-an-end" went into an operation called, Xenophobic attack. The operation is simple: Attack all foreigners who are successful. Little did they realise that the foreigners were the same foreigners who sheltered them during the Apartheid regime. They forgot their gratitude and the killing spree began. This was their brilliant idea, to create jobs that they could fill, and possibly to get government to listen to them.

This is how far job security can influence a person.

Job Security for software developers?

 Job security for software developers have taken some weird techniques:
  1. Documentations: Some developers, realising that they feel threatened by the new "kid on the block" or feels like he/she is not worth, they prefer writing bad documented softwares or have little testing in code. This allows them to keep them secure for a while until they keep in their feet and fight back.
  2. Becoming the irreplaceable person: Some become the irreplaceable person. They purposely don't share their knowledge, such that, when he/she leaves, they know they will be re-hired just for knowledge sharing.
  3. Writing a system that looks simple but is complex to understand: Some developers, such as myself, architecturize software to make it simple for other developers to code and implement, but is complex to majority of developers. E.g. using regular expression, it beats 97% of my colleagues. 
Others are mentioned here.


How do I fight back?

So, how do you fight back? Get some boxing gloves, train and invite him/her to a boxing ring and *some text removed to please sensitive readers*! Seriously. I suggest creating an environment where you can thrive and become who you want to be. Start a company.

If you can't start a company, find another job or replace the current nemesis and take his place. This is a competitive world and you have to make the cookie crumble. Never sacrifice your dignity & reputation to please others. I don't and it never got me far, but my time will come.


Now, go back to code!



Thursday, February 16, 2012

StackOverflow: What happens when there's insufficient memory to throw an OutOfMemoryError?

Sorry for the procrastination, I've been doing some work refactoring existing systems at work.

I've recently answered this question on StackOverflow: What happens when there's insufficient memory to throw an OutOfMemoryError?

I will like to thank every developer for your vote of confidence, it brought a smile on my face (now, I know what I was born to do....*movie voice*, lol).

Anyways, I would like to know from other developers (not registered on StackOverflow). If you have other points to point out (outside of what's already posted on StackOverflow), feel free to comment below. 

Let the commenting begin... :-)

Friday, October 7, 2011

Steve Jobs, an innovator, visionary, pioneer, and a genius.


When I heard that BMW introduced a iPod integrator in their vehicle, I went to buy my very first Apple device, the iPod 30 GB (5th generation), white and I integrated it with my VW Polo. This was in 2007. It was eventually stolen and I bought the black version. I even remember watching "Sky High" on my iPod on a plane going to Cape Town. I landed just as the movie ended.

In 2010, I was sceptical about getting an iPhone, so when opportunity came to buy an iPad, I bought my only iPad, the first generation iPad, 16 GB Wi-fi only. To this day, I cannot live without connecting my iPod to my car and iPad to get all my emails, Skype and reading magazines.

Steve Jobs blended culture, business and geekiness into his brands of product, so this is my blog to say "Thank you Mr. Steve Jobs. You've changed the way I code and enjoy technology today". My condolences goes out to Mrs. Laurene Powell Jobs and the immediate family in this time of mourning.

R.I.P. Steve Jobs, you've likened to Harrison Ford and the apple-awaked genius, Isaac Newton.

Wednesday, September 14, 2011

POJO instantiator Utility

Just a random post for everyone.

If you don't know what Plain Old Java Object (POJO) is, take a look at Wikipedia's explanation thereof.

I have written a simple POJO instantiator. This instantiator is not fully perfect but it does what it was designed thus far.
My criteria I have choose of what constitutes a POJO is simple:
  1. A class must have a no constructor at all, or a public zero-argument constructor.
  2. The instance variables must have a respective getter and setter method (of which, both must be public).
What this utility class doesn't do is the following:
  1. It never instantiates a final instance or a static final instance.
  2. serialVersionUID is ignored.
  3. Array instance variables are not instantiated.
  4. Any instance variable which has the same type as the class it is declared is not instantiated. The reason is that the utility class will go into an infinite recursive loop and a StackOverflowError is thrown.
OK, enough of the pleasantries, let's get to the code, shall we? And here it is.




If you have found any issues or have further things to see from this utility, please feel free to comment below or give a shout out! :-)


Happy coding! :-)

Thursday, August 4, 2011

Interfacing with Apache Cassandra 0.8 in Java.


Apache Cassandra is a NoSQL solution that was developed by Facebook to power their Inbox Search System. It is used by prominent companies such as Reddit, Twitter, Rackspace, Digg, to name but a few.

Cassandra's data model is based on column families (which is indexed), with its basic unit of storage, called a column. A column is a name-value store, which are grouped to a column family. You can have indefinite amounts of columns in a column family. Every column family's key must be unique. I don't want to go into details explaining column families so I'll rather post links that you will need to read before venturing further into this blog. There's an interesting article describing the Cassandra data model. Check out WTF is a SuperColumn? An Intro into the Cassandra Data Model.

This is a simple introduction to Cassandra 0.8 as there has major changes from version 0.6 to the current version.

 

Prerequisites.

Cassandra is written in Java, so you will need to download the latest Java in order to run Cassandra. I'm running JDK 1.6.0_25, but any JDK 5 and higher can do.

Downloading and Unzipping Apache Cassandra.

To begin, we will need to download Apache Cassandra from the Apache Cassandra Download Page (I've downloaded the latest Cassandra, version 0.8.2, apache-cassandra-0.8.2-bin.tar.gz). Unzip the archive to the root directory (preferable for the Windows OS users) or a directory of your choice (I'm using Windows 7 Ultimate, and I've unzipped the archive to c:\apache-cassandra-0.8.2\ folder).


Before we continue, we need to setup 2 important environment variables: CASSANDRA_HOME and JAVA_HOME. CASSANDRA_HOME must point to your Cassandra directory (sans specifying the bin folder) and JAVA_HOME needs to point to your java directory (You should know this by now, if you're a java developer! .NET, there's Google! :p)


Now that we're set, let's have some fun!

Setting up and running Apache Cassandra.

Prior to Apache Cassandra 0.7, you had a storage configuration file called storage-conf.xml in your CASSANDRA_HOME/conf folder (if memory serves me correctly). This doesn't apply from Apache Cassandra 0.7 and higher. As of 0.7, the storage configuration file is described in CASSANDRA_HOME/conf/cassandra.yaml file. For more information on storage configuration in Cassandra, visit the Apache Cassandra Wiki StorageConfiguration.

To run Cassandra, go to CASSANDRA_HOME/bin folder and type the following command:

cassandra -f

(the -f option is to tell Cassandra to run on foreground as a non-daemon process). 

If you want to record the cassandra process id to a file, simply use the -p variable, e.g. cassandra -p /var/cassandra.pid

To see if you have successfully started Cassandra, a message will be displayed on your bash/shell window/Command prompt like so (forget the date/time stamp):

INFO [Thread-4] 2011-08-03 12:33:48,880 CassandraDaemon.java (line 145) Listening for thrift clients...

If you see the bolded text ("Listening for thrift clients...") then you should start smiling. :-)

Now, we need to see if Cassandra is truly running. Start Cassandra-CLI (Command Line Interpreter) in another shell/command prompt. In CASSANDRA_HOME/bin folder type

cassandra-cli

The following output should be similar to the one I have below:

Starting Cassandra Client
Welcome to the Cassandra CLI.


Type 'help;' or '?' for help.
Type 'quit;' or 'exit;' to quit.


[default@unknown]

Once you see the text [default@unknown] on your screen, type the following command (In Cassandra CLI, every Cassandra command is terminated with a semi-colon ;, else it'll display an ellipsis, ... waiting for a semi-colon):

connect localhost/9160; 

A successful response to the above command will be (in this effect)Connected to: "Test Cluster" on localhost/9160

Another way to connect to Cassandra with Cassandra CLI is to pass the connection parameters when calling cassandra-cli, as follows:

cassandra-cli -host localhost -port 9160

(Cassandra default port is 9160). The result is exactly as above.

Now, let's see if we Cassandra is truly listening (for thrift clients). In Cassandra CLI, type 

show keyspaces;

If you see a list of keyspaces (default keyspace is "system") then Cassandra is up and running.

Type help; on the CLI to see a list of available Cassandra CLI commands. :-)

 

Java Examples: Using Apache Thrift.

For this demonstration, I am using Thrift 0.6.1 (latest, at the time of writing) from Apache Thrift.

Cassandra now expect java.nio.ByteBuffer whereas it was (in Cassandra 0.6 and lower), it used byte arrays. I suggest that you always refer to the Cassandra API Wiki when you're interfacing Cassandra with Thrift.

I will demonstrate how to create a new keyspace, "Keyspace1" and create a column family called "Authors" using Apache Thrift in java. Note: Prior to Cassandra 0.7, a keyspace definitions, with all its column families declarations were written in storage-conf.xml. This doesn't apply anymore: You will have to write code to create your keyspace and column families definitions.

My keyspace and Authors column family is pictured as follows:


And here's the full demonstration code on how I achieved this: I've posted comments for easy understanding :-)




As you can see, this code throws an UnavailableException. The Cassandra API simply gives a one liner explanation of what UnavailableException means:


Not all the replicas required could be created and/or read.

This is simple: I am using a SimpleStrategy and SimpleStrategy requires a replication_factor to be set. For NetworkTopologyStrategy, you will have to specify each data centre and the replication number on the strategy_options (More information can be found here). Now, we need to add a replication factor, since Cassandra 0.8 doesn't have the integer field for replication_factor anymore, we need to add this field onto the Map<String, String> strategy_options.

The following code, below, shows how:



And now, remove, this code keyspaceDefinition.setReplication_factorIsSet(false);, and we're good to go.

The final code below throws no exceptions.



Hooray, it works!!! :-)

I will continue with a tutorial on how to connect with Hector (a Java Cassandra Client). Hector comes with wonderful features, such as Connection Pooling for Cassandra, JMX Support, etc. For more information on Hector, head over to the Hector site.


Have fun!

PS: A related StackOverflow question can be useful too, I hope. :-)