Saturday, March 8, 2014

Leadership, Communication & Motivation

I usually prefer to not write anything on leadership, management, motivation and the other similar topics as I wanted to keep myself as a person who absolutely has nothing to do with these things, however, the time has come to tell you:) what I think about these overrated L-word and the other cooperate holy words. I don’t know whether it's my friends; or the fact that ever since I started "ACTIV" with my friends, I’m on a constant look-out for successful organizations, leaders and many other related things; or the fact that we are being bombarded with the L-word by the corporate culture we all are voluntarily subscribed to; or the recent extreme attention to American MBAs and its managerial teachings in Sri Lanka; or the fact that most political, religious and corporate people use too often these cool words to make people actually believe that there is a hell of a lot they know... I just don’t know why I think about these things :). I have heard enough of these words, influenced enough by the people/education that talk about these worlds, watched videos on it and read enough LinkedIn articles on these things, now I actually want to develop these skills and quickly let you know what I think about Leadership, Communication & Motivation in this post.

Leadership 
A leader needs the guts to stand alone and look ridiculous. The key is he/she must be easy to follow! Leader needs followers. Following is more difficult than leading when the leader is not very capable of leading.  They publicly shows everyone how to follow. Notice the leader embraces him/her as an equal, so it's not about the leader anymore - it's about being a follower first. All the good leaders I had the pleasure working with use friendship as a tool to bridge the gap between leading and following and add real value to leadership. Notice he's calling to his friends to join in. It takes guts to be a first follower! You stand out and brave ridicule, yourself. Being a first follower is an under-appreciated form of leadership. The first follower transforms a lone nut into a leader. I read somewhere - If the leader is the flint, the first follower is the spark that makes the fire. You might be a person who's not so comfortable with the word follower, it's because people don't like to use the word follower(s) in the cooperate world. We like to use the word team, almost in every-places we want to use followers and we managed to make the word cooler. As I must have mentioned earlier, Leadership is over-glorified; so is team. So, leadership happens when you find a lone nut doing something great about something the nut really cares about(vision), have the guts to be the first person to stand up and join in. 1) have the vision 2) be public 3) be easy to follow 4) make some sense and be compact (Communication) 5) Have passion - make impossible possible ( Motivation ).


Communication 
It's really a border subject and way over my head to talk about, yet I'm going to continue. I had issues clearly telling my ideas to my friends at ACTIV. I can vividly remember telling my friend "It's clear in my head, but I don't know how I'm going to make you understand as exactly as is in my mind." I must have offended him saying so as his response was not very polite. Also, when the HR has nothing to avoid promoting you, they often magically make the word appear out of thin air and say "You need to develop your communication skills to get the promotion in the next cycle" - it wouldn't be a breach of the confidentially clause I signed, if I say that it really happened to me by an HR individual who had no knowledge what so ever of what I was doing in the company nor had the capacity to measure my skill sets. Most often, ideas has context, dependencies and a million related things you should know about to understand. When we try to communicate someone, it's really hard to assume that the person whom you're trying to communicate understand the context and he has the dependency knowledge. It's even harder, if we try to communicate to a person whom we don't know or we have to communicate to a group instead of one person. Some of the ideas take months even years to unconsciously build up and make sense. There will be a million small nuances that matter associated with our idea and when we try to tell others, it's almost always impossible and stressful. The purpose of communication is to get your message across to others clearly and unambiguously. Doing this involves effort from both the sender of the message and the receiver. And it's a process that can be fraught with error, with messages often misinterpreted by the recipient. When this isn't detected, it can cause tremendous confusion, wasted effort and missed opportunity. In fact, communication is only successful when both the sender and the receiver understand the same exact information as a result of the communication. By successfully getting your message across, you convey your thoughts and ideas effectively. When not successful, the thoughts and ideas that you convey do not necessarily reflect your own, causing a communications breakdown and creating roadblocks that stand in the way of your goals – both personally and professionally. Create and environment where everyone feel save to express ideas, opinion,  and feelings, or plan or problem solving in creative ways.

Its very true that most of what we communicate is not through by talking. Body language and our facial expressions carry a lot more than we think we do. There was a presentation given a us at the British Council Colombo and they had professionals to show us the ways an idea could be expressed differently. In my blog, I prefer to write my personal experience and my own view about the things I write rather than a general idea, so It would only be fair, if I tell you what makes me challenged/makes it difficult when it comes to communication. My experience is that when I work on codes(technical things/logical) too long and suddenly want to speak to somebody or speak about the code I was working on, I often struggle to talk. Even the most frequently spoken words will slip away from my mind for a while. May be it's just that my left brain was constantly getting the resources allocated and suddenly when I try to wake my right brain, it crashes or something.. :) I have no scientific facts to back me up on this, yet I have convinced myself with my theory on this.

Motivation - Motivation is literally the desire to do things. More than half of the morning emails I read on this and Google plus posts should make me an expert on this subject. When I have a clear reason to do something or inner desire to want something, I'm so motivated - It's just that simple. To motivate myself, I just need to convince myself with some reasoning or I need a prove of; if I do this, I'll get this. Of cause, that the common reasoning process of a human mind consciously. And there is more..

Motivation is defined as the process that initiates, guides and maintains goal-oriented behaviors. Motivation is what causes us to act, whether it is getting a glass of water to reduce thirst or reading a book to gain knowledge. It involves the biological, emotional, social and cognitive forces that activate behavior. 

The above is the extract of the first five links for a Google search. Further the articles read that a number of different theories of motivation, including drive theory, instinct theory and humanistic theory. There are three major components to motivation: activation, persistence and intensity. Different types of motivation are frequently described as being either extrinsic or intrinsic. Extrinsic motivations are those that arise from outside of the individual and often involve rewards such as trophies, money, social recognition or praise. Intrinsic motivations are those that arise from within the individual, such as doing a complicated cross-word puzzle purely for the personal gratification of solving a problem.

Who needs forced motivation? Someone who does something he/she doesn't like. I'm talking about the motivational trainings motivational speaks do. I can speak for myself here as I, myself have attended few trainings, that they actually do work/help us get motivated. They help us find the reasons and help us figure out why we do what we do.  Research shows you can influence your own levels of motivation and self-control. So figure out what you want, power through the pain period, and start being who you want to be. Goal Setting is extremely important to motivation and success.  Certainly, we need some intelligence, knowledge base, study skills, and time management skills, but if we don't have motivation, I don't think we will go get far.

Motivation is the force that initiates, guides and maintains goal-oriented behaviors. It is what causes us to take action, whether to grab a snack to reduce hunger or enroll in college to earn a degree. The forces that lie beneath motivation can be biological, social, emotional or cognitive in nature.

I find the blow very useful and is from about.com/od/motivation.

William James has created a list of human instincts that included such things as attachment, play, shame, anger, fear, shyness, modesty and love. The main problem with this theory is that it did not really explain behavior, it just described it. By the 1920s, instinct theories were pushed aside in favor of other motivational theories, but contemporary evolutionary psychologists still study the influence of genetics and heredity on human behavior.
Incentive Theory of Motivation
The incentive theory suggests that people are motivated to do things because of external rewards. For example, you might be motivated to go to work each day for the monetary reward of being paid. Behavioral learning concepts such as association and reinforcement play an important role in this theory of motivation.
Drive Theory of Motivation
According to the drive theory of motivation, people are motivated to take certain actions in order to reduce the internal tension that is caused by unmet needs. For example, you might be motivated to drink a glass of water in order to reduce the internal state of thirst. This theory is useful in explaining behaviors that have a strong biological component, such as hunger or thirst. The problem with the drive theory of motivation is that these behaviors are not always motivated purely by physiological needs. For example, people often eat even when they are not really hungry.
Arousal Theory of Motivation
The arousal theory of motivation suggests that people take certain actions to either decrease or increase levels of arousal. When arousal levels get too low, for example, a person might watch and exciting movie or go for a jog. When arousal levels get too high, on the other hand, a person would probably look for ways to relax such as meditating or reading a book. According to this theory, we are motivated to maintain an optimal level of arousal, although this level can vary based on the individual or the situation.
Humanistic Theory of Motivation
Humanistic theories of motivation are based on the idea that people also have strong cognitive reasons to perform various actions. This is famously illustrated in Abraham Maslow's hierarchy of needs, which presents different motivations at different levels. First, people are motivated to fulfill basic biological needs for food and shelter, as well as those of safety, love and esteem. Once the lower-level needs have been met, the primary motivator becomes the need for self-actualization, or the desire to fulfill one's individual potential.

Also, personal preferences and circumstances have a huge impact on motivational levels. I believe prioritizing and having a plan is as important as being motivated to do something to succeed. A fun example, I want to go to gym badly and I'm motivated, yet I couldn't go as there are other important things I had to take care time-to-time (I can hear u say: poooh, like what? :p anyways) there are days I really do have things stopping me to go to the gym and that irregularity demotivates me to go to gym.

----

There are many more similar things I would like to write and share with you - like, what is the deference between going to a five-star hotel wearing a suit to spend a hundred rupees and going with a dirty t-shirt and spending a few grands; the psychology behind it and my experience on that. But I just ran out of motivation to write more, so let me power-up my motivational level and write on the next post. FAREWELL 'TIL NEXT TIME.

Wednesday, January 15, 2014

Clean Coding Techniques and Best Programming Practices

One of my favourite things to do when I'm free is open a code file from one of the best known open source projects and look at the code. Some of them programmers are truly amazing in writing codes applying the best coding practices and use OOP concepts. There are many good ways to architect and design a system depending on the size of the project. Those days, I was working on many small projects and now have the opportunity to work in fairly big scale projects and when I see the deferences and techniques used comparing to the small projects, I understand how clever some of these software engineering human beings are. Some of my colleagues could explain me, a complex concept I wouldn't understand reading books, in few minutes. Learning and understanding some fascinating facts form superiors while working's very valuable.  Sometime a line could explain you whole lot than a whole page ever could explain. Example ha?..
“ Java is to JavaScript what Car is to Carpet. ” - Chris Heilmann
If you look at the code someone new written in your project, you will understand when I explain you the feeling of trying to swallow your food for lunch after looking at the code. On the other hand, some people just know how to make a bouquet out of a few code files. What I'm trying to get you to agree is that some projects are really a joy to work on just because of the way it's been designed, coded, managed and some projects are pain to work on.

As a programmer, it's very important for me to understand the basic concepts well and to use best practices out there. Ever since I sat for a lecture in Dr Even's class, I'm keen on learning these best practices and want to code like a pro. He teaches while writing codes like writing emails. The way he structures code, put them into different files with meaningful file names and getting it working; it's truly mesmerizing experience. He's able to show us examples of simple code to carry complex functionality. To be able write simple code to do complex things would be one the thing I really wanted to be good. So, whenever I come across articles about coding best practices and code samples, I add to my pocket and this post is a sum-up of the collection.

Clean Coding Techniques and Best Programming Practices
“Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.” - Martin Golding
COUPLING & COHESION

I really started to understand the importance of Coupling and Cohesion only after I started working for big projects and started seeing the deference. For this post sake, let's look at a little on this. Also, for my learning too, I'm going to browse my  pocket links on this topic and many other relevant topics and copy them here. I'll try to put all the links I referred for this post. I usually doesn't like to copy other people's work here, yet I don't think I have to re-write something is been already written nicely in books or in websites. I wanted to remind some of these things, so, I'm going to go through and whatever I find useful in these area, I'm going to copy here. Simple - ha?:)

Coupling is an indication of the strength of interconnections between program units. Highly coupled have program units dependent on each other. Loosely coupled are made up of units that are independent or almost independent. When I start writing code in the beginning, most the function or components I write will call other functions and they're interconnected. When I try to modify something, it's really a headache. After a while, if we look at the code, It's really a challenge to understand the code and modify and these changes are pron to many code breaks.

“ Before software can be reusable it first has to be usable. ” - Ralph Johnson

Obviously, it very hard to keep functions totally independent and in many cases, it's almost impossible to have modules completely independent of each other. The more connections between functions, the more dependency and more issues later. It wouldn't make much of a deference if it's a small project and absolutely no requirement to upgrade it in the future.

According to Clarlson, there are three factors: number of interfaces, complexity of interfaces, type of info flow along interfaces.

Want to minimize number of interfaces between modules, minimize the complexity of each interface, and control the type of info flow. An interface of a module is used to pass information to and from other modules. In general, modules tightly coupled if they use shared variables or if they exchange control info. Loose coupling if info held within a unit and interface with other units via parameter lists. Tight coupling if shared global data. If need only one field of a record, don't pass entire record. Keep interface as simple and small as possible.

Two types of info flow: data or control.

Passing or receiving back control info means that the action of the module will depend on this control info, which makes it difficult to understand the module. Interfaces with only data communication result in lowest degree of coupling, followed by interfaces that only transfer control data. Highest if data is hybrid. 

Ranked highest to lowest: 
Content coupling:
If one directly references the contents of the other. When one module modifies local data values or instructions in another module. (can happen in assembly language) if one refers to local data in another module. if one branches into a local label of another.
Common coupling:
Access to global data. modules bound together by global data structures.
Control coupling:
Passing control flags (as parameters or globals) so that one module controls the sequence of processing steps in another module. 
Stamp coupling:
Similar to common coupling except that global variables are shared selectively among routines that require the data. E.g., packages in Ada. More desirable than common coupling because fewer modules will have to be modified if a shared data structure is modified. Pass entire data structure but need only parts of it.
Data coupling:
Use of parameter lists to pass data items between routines.

Cohesion

Cohesion is the measure of how well module fits together. A component should implement a single logical function or single logical entity. All the parts should contribute to the implementation.

Many levels of cohesion: 

Coincidental cohesion: 
The parts of a component are not related but simply bundled into a single component. harder to understand and not reusable.
Logical association: 
Similar functions such as input, error handling, etc. put together. Functions fall in same logical class. May pass a flag to determine which ones executed.
interface difficult to understand. Code for more than one function may be intertwined, leading to severe maintenance problems. Difficult to reuse
Temporal cohesion:
All of statements activated at a single time, such as start up or shut down, are brought together. Initialization, clean up.
Functions weakly related to one another, but more strongly related to functions in other modules so may need to change lots of modules when do maintenance.
Procedural cohesion: 
A single control sequence, e.g., a loop or sequence of decision statements. Often cuts across functional lines. May contain only part of a complete function or parts of several functions.
Functions still weakly connected, and again unlikely to be reusable in another product.
Communicational cohesion:
Operate on same input data or produce same output data. May be performing more than one function. Generally acceptable if alternate structures with higher cohesion cannot be easily identified.
still problems with reusability.
Sequential cohesion:
Output from one part serves as input for another part. May contain several functions or parts of different functions.
Informational cohesion:
Performs a number of functions, each with its own entry point, with independent code for each function, all performed on same data structure. Different than logical cohesion because functions not intertwined.
Functional cohesion: each part necessary for execution of a single function. e.g., compute square root or sort the array. Usually reusable in other contexts. Maintenance easier.
Type cohesion: 
Modules that support a data abstraction.
Not strictly a linear scale. Functional much stronger than rest while first two much weaker than others. Often many levels may be applicable when considering two elements of a module. Cohesion of module considered as highest level of cohesion that is applicable to all elements in the module.

Ref: http://courses.cs.washington.edu/courses/cse403/96sp/coupling-cohesion.html - Thanks: Adam Carlson


Coding Standards and Code Reviews

Using good programming practices to create high quality code is important to produce quality software with high performance. A comprehensive coding standard encompasses all aspects of code construction and, while developers should exercise prudence in its implementation, it should be closely followed. Completed source code should reflect a harmonized style, as if a single developer wrote the code in one session. Adherence to a coding standard can only be feasible when followed throughout the software project from inception to completion. It is not practical, nor is it prudent, to impose a coding standard after the fact. Coding techniques incorporate many facets of software development and, although they usually have no impact on the functionality of the application, they contribute to an improved comprehension of source code. For the purpose of this document, all forms of source code are considered, including programming, scripting, markup, and query languages.

“Measuring programming progress by lines of code is like measuring aircraft building progress by weight.”
- Bill Gates  (co-founder of Microsoft)

When you write code, consider the following to improve performance, keep the coding clean and to reduce run time exceptions.

  • Declare All Variables - In some programming languages, like in JavaScript or in C#. A variable that is not declared will be created with a default type. Normally it will be implicitly created as a Variant. 
  • Avoid elusive names that are open to subjective interpretation, such as Analyze() for a routine, or jjK4 for a variable. Such names contribute to ambiguity more than abstraction.
  • In object-oriented languages, it is redundant to include class names in the name of class properties, such as Book.BookTitle. Instead, use Book.Title.
  • Use the verb-noun method for naming routines that perform some operation on a given object, such as CalculateInvoiceTotal().
  • In languages that permit function overloading, all overloads should perform a similar function. For those languages that do not permit function overloading, establish a naming standard that relates similar functions.
  • Use Strongly Typed Object Variables - Object variables represent pointers to COM objects. They can be declared in two ways, as follows: 
    • When you defect a variable As Object in Java or C# that variable can be used to represent any kind of object; this is a weakly typed object variable
    • Use the As keyword with the specific type of the object; this is a strongly typed object variable.
  • Names - Perhaps one of the most influential aids to understanding the logical flow of an application is how the various elements of the application are named. A name should tell "what" rather than "how." By avoiding names that expose the underlying implementation, which can change, you preserve a layer of abstraction that simplifies the complexity. For example, you could use GetNextStudent() instead of GetNextArrayElement().
  • Append computation qualifiers (Avg, Sum, Min, Max, Index) to the end of a variable name where appropriate.
  • Use customary opposite pairs in variable names, such as min/max, begin/end, and open/close.
  • Since most names are constructed by concatenating several words together, use mixed-case formatting to simplify reading them. In addition, to help distinguish between variables and routines/functions, use Pascal casing (CalculateInvoiceTotal) for routine/functions names where the first letter of each word is capitalized. For variable names, use camel casing (documentFormatType) where the first letter of each word except the first is capitalized.
  • Boolean variable names should contain Is which implies Yes/No or True/False values, such as fileIsFound.
  • Avoid using terms such as Flag when naming status variables, which differ from Boolean variables in that they may have more than two possible values. Instead of documentFlag, use a more descriptive name such as documentFormatType.
  • Even for a short-lived variable that may appear in only a few lines of code, still use a meaningful name. Use single-letter variable names, such as i, or j, for short-loop indexes only.
  • If using Charles Simonyi's Hungarian Naming Convention, or some derivative thereof, develop a list of standard prefixes for the project to help developers consistently name variables. For more information, see "Hungarian Notation."
  • For variable names, it is sometimes useful to include notation that indicates the scope of the variable, such as prefixing a g_ for global variables and m_ for module-level variables in Microsoft Visual Basic®.
  • Constants should be all uppercase with underscores between words, such as NUM_DAYS_IN_WEEK. Also, begin groups of enumerated types with a common prefix, such as FONT_ARIAL and FONT_ROMAN.
  • A tenet of naming is that difficulty in selecting a proper name may indicate that you need to further analyze or define the purpose of an item. Make names long enough to be meaningful but short enough to avoid being wordy. Programmatically, a unique name serves only to differentiate one item from another. Expressive names function as an aid to the human reader; therefore, it makes sense to provide a name that the human reader can comprehend. However, be certain that the names chosen are in compliance with the applicable language's rules and standards.
  • When naming tables, express the name in the singular form. For example, use Employee instead of Employees.
  • When naming columns of tables, do not repeat the table name; for example, avoid having a field called EmployeeLastName in a table called Employee.
  • Do not incorporate the data type in the name of a column. This will reduce the amount of work needed should it become necessary to change the data type later.
  • In Microsoft SQL Server, do not prefix stored procedures with sp_, because this prefix is reserved for identifying system-stored procedures.
  • In Transact-SQL, do not prefix variables with @@, which should be reserved for truly global variables such as @@IDENTITY.
  • Minimize the use of abbreviations. If abbreviations are used, be consistent in their use. An abbreviation should have only one meaning and likewise, each abbreviated word should have only one abbreviation. For example, if using min to abbreviate minimum, do so everywhere and do not later use it to abbreviate minute.
  • When naming functions, include a description of the value being returned, such as GetCurrentWindowName().
  • File and folder names, like procedure names, should accurately describe what purpose they serve.
  • Avoid reusing names for different elements, such as a routine called ProcessSales() and a variable called iProcessSales.
  • Avoid homonyms when naming elements to prevent confusion during code reviews, such as write and right.
  • When naming elements, avoid using commonly misspelled words. Also, be aware of differences that exist between American and British English, such as color/colour and check/cheque.
  • Avoid using typographical marks to identify data types, such as $ for strings or % for integers.
  • When it come to Comments, Software documentation exists in two forms, external and internal. External documentation is maintained outside of the source code, such as specifications, help files, and design documents. Internal documentation is composed of comments that developers write within the source code at development time.
  • One of the challenges of software documentation is ensuring that the comments are maintained and updated in parallel with the source code. Although properly commenting source code serves no purpose at run time, it is invaluable to a developer who must maintain a particularly intricate or cumbersome piece of software.
  • Following are recommended commenting techniques:
  • When modifying code, always keep the commenting around it up to date.
  • At the beginning of every routine, it is helpful to provide standard, boilerplate comments, indicating the routine's purpose, assumptions, and limitations. A boilerplate comment should be a brief introduction to understand why the routine exists and what it can do.
  • Avoid adding comments at the end of a line of code; end-line comments make code more difficult to read. However, end-line comments are appropriate when annotating variable declarations. In this case, align all end-line comments at a common tab stop.
  • Avoid using clutter comments, such as an entire line of asterisks. Instead, use white space to separate comments from code.
  • Avoid surrounding a block comment with a typographical frame. It may look attractive, but it is difficult to maintain.
  • Prior to deployment, remove all temporary or extraneous comments to avoid confusion during future maintenance work.
  • If you need comments to explain a complex section of code, examine the code to determine if you should rewrite it. If at all possible, do not document bad code—rewrite it. Although performance should not typically be sacrificed to make the code simpler for human consumption, a balance must be maintained between performance and maintainability.
  • Use complete sentences when writing comments. Comments should clarify the code, not add ambiguity.
  • Comment as you code, because most likely there won't be time to do it later. Also, should you get a chance to revisit code you've written, that which is obvious today probably won't be obvious six weeks from now.
  • Avoid the use of superfluous or inappropriate comments, such as humorous sidebar remarks.
  • Use comments to explain the intent of the code. They should not serve as inline translations of the code.
  • Comment anything that is not readily obvious in the code.
  • To prevent recurring problems, always use comments on bug fixes and work-around code, especially in a team environment.
  • Use comments on code that consists of loops and logic branches. These are key areas that will assist the reader when reading source code.
  • Separate comments from comment delimiters with white space. Doing so will make comments stand out and easier to locate when viewed without color clues.
  • Throughout the application, construct comments using a uniform style, with consistent punctuation and structure.
  • Despite the availability of external documentation, source code listings should be able to stand on their own because hard-copy documentation can be misplaced.
  • External documentation should consist of specifications, design documents, change requests, bug history, and the coding standard that was used.
  • Formatting makes the logical organization of the code stand out. Taking the time to ensure that the source code is formatted in a consistent, logical manner is helpful to yourself and to other developers who must decipher the source code.
Ref: http://msdn.microsoft.com/en-us/library/aa260844(v=vs.60).aspx Thanks: Rob Caron - Microsoft Corporation

Hope I shared something useful to you today and I'm going to end this post giving a tip from my experience to those who want to freelance work by quoting Edward V Berard  -
”Walking on water and developing software from a specification are easy if both are frozen.”

Monday, December 2, 2013

How much money should I be making?

From what I talk to my friends, I understand that the concern in the Sri Lankan IT industry is that often its workers, despite long and hard work, the need for continually leaning to keep-up with the rapidly changing technologies, do not earn enough to enjoy a decent standard of living. The post war Sri Lanka, after effects of CHOGM, the rapidly rising cost of living that erodes the real wages and the stagnant or declining family incomes have given rise to the clamour for a more decent and fair wage structure in the industry. There is an industry strategy to base its competitive advantage on skilled work force and better labor standards, both of which needs a corresponding recognition of the value of the workers through adequate, livable and fair salaries.

It is also very true that most of us incur several hidden costs arising from our employment in IT industry, which is not readily apparent in the market determined wages. Compare to other industries, the hidden costs arising from our employment is high in IT industry and in this background, as no sector specific living wage has been calculated.

Living wage is not the same as minimum wage. Minimum wage is the lowest wage permitted by law or by a special agreement. A living wage is a wage which is high enough to maintain a normal standard of living. Usually, according to Google,

Living Wage = (Average household size x Adjusted cost of basic needs/person + (Income x Savings Multiplier)) / Average number of income receivers per house hold
OR
Living wage = (Adjusted cost of basic needs) + (Income X Savings Multiplier for savings + EPF + durables) + (a Constant for embedding the worker in the family unit + hidden cost)

Our wages would be reasonable according to the above equation, if we stupidly avoid calculating the hidden industry specific costs. For example, for me, as a software engineer, I’m required to browse internet, I need to have a computer and reasonably fast internet connect, a smart phone, money to go team outing with project members, contribute to the organizational charity events, clothing, books & magazines, professional trainings .etc..

Last couple of month I was asking around other people as to how much they are getting paid. A cleaner salary is around 20-30 grand a month in Abanse (shift basic); a Taxi driver makes 45 thousand a month while he has to pay lease 17,000; a Marketing executive in garment industry with 4 years of experience makes 55 thousand a month basic salary + commission approximately 30-70 thousand a month depending on time of the year; an assistant bank manager in a private bank with 5 years banking experience gets 120 thousand basic salary + 25 thousand for vehicle + paid holiday once an year; an intern job in a bank pays you 15 grand a month; a graphic designer with 4 years designer experience in a private advertising agency get 85 thousand basic.

My problem is, I don’t know how much salary I should be getting paid. Do you know how much your co-workers get paid at your company? I think you should. I mean, who is being protected by secret salaries? Certainly not the employee—the more transparent salaries are, the more accurately an employee can assess his or her value to a company.

I thought that companies benefit from secret salaries and that’s why they keep them secret, but the reality is that, if salaries were 100% accurate—perfectly pegged at the employee’s worth to the company—then the company would have no problem revealing all salaries. I know valuing an employee’s worth is not an easy job, yet that’s why the HR is for, right? The human resource team is the team responsible a company’s growth and its failures. As I see in the companies I have the close visibility, some senior managers hire college graduates as HR executives and let them run with whatever they got. Those people come and start to tell us what should be done in other departments(in some cases). The only people who benefit from confidential salaries are the human resources department. If they make an error, they can hide it. No one will know. And then they can make ten errors. Because no one knows if the secret salaries are hiding one error or one hundred.

At this time of year, companies are completing annual/quarterly reviews for employees, and many people are looking forward to promotions and salary raises. When they get it as they expect, everything is just fine and they will be motivated to work harder and enjoy the little happy things they get out of an employment. But, if they don’t get what they expected or what they deserve and told an unseasonal reason as to why they didn’t get it, there comes the part an individual and the company he/she works for gets really affected negatively. I agree, nothing motivates people as money does and not everyone deserves to be promoted or get salary rose.

If it’s a bad economy and people know other’s salary too, I don’t think they would be much worried about their salary knowing that everyone gets paid low. Person who was underpaid was not so much jubilant about a potential raise, but upset about his current underpayment. But honestly, I think that person will work much harder if everyone knows the truth.

There are four kinds of people who work in any organization as far as I see, in terms of salary and competence. First kind - working hard, competent, qualified, experienced and getting paid high – as they deserve. Second kind - working hard, competent, qualified, experienced and getting paid low(less than they should be getting paid) as they lack the ability to let others know that they work better. Third kind - lazy, incompetent, has a bad personality, but just by talking (boasting about their work) and claiming credits form others unfairly and getting paid more. The fourth kind – lazy, incompetent .etc. and getting paid less as they should be.

Sadly, we seem to have many of the second and third kinds of people in Sri Lanka. From what I know, people like to work and they want to make the best things, at least most of us. It’s just a matter of enabling them to do so would make any company better.

The other issue I see in Sri Lanka in terms of employment is that most of the HR professionals seem to value qualification over expertise whereas it’s seems to be the other way around in western countries. May be it’s their inability to evaluate a person’s skill set; they tend to go with qualification.

This type of issues drives me crazy because they are, in fact, real reason why many of us are struggling and they are not applicable to a small percentage of any organization's staff who can whine and talk HR. I’m going to quote here a comment I read in linked in
 “Management thinks: ‘This guy (or gal) will do whatever we ask in his current position and at his current wage; there is no reason to promote him much less pay him more money.’ The carrots of promotions and pay increases, oddly enough, are more likely to go to the entitled, under-performing and whiny employees who only work on a quid pro quo basis, while the sticks are reserved for those employees who give and don't count the cost. “ - Mike Bach (in a Linkedin comment)

A part of me asks myself “Why are you complaining? Why do you want to write about this on your blog no body reads? :)” The other part replies “I’m not. I’m just trying to express my frustration of existing ‘very real’ problem in a form, which can be read by others and relate to. This should help them understand this issue a little bit better and I know there would be people those who could make changes in evaluating people and rewarding right people and transform people’s life, industrial health & our country for better.
Pretending to work and posing for photo 8 years ago at my first job
Pretending to work and posing for photo, 8 years ago at my first job

Sunday, October 6, 2013

Memento

I was ambitious, having failed my A levels and didn't have any qualifications. I felt as if it would be my last and only chance to switch my life upside down. I knew very well, I can't afford to get anything wrong at the point of time where I was applying to go to UK, April-May time of 2008. Those days, I was not a fan of taking photographs or collecting souvenirs. I used to think that the life should just go on without collecting things to remember our lives as we live.
Managed to get the visa and went to UK. At the beginning, days were slowly passing by and dull with a big question mark about my future screwing me in my head everyday. It was not easy to have too many unknowns and stay alone reading the guide book university had provided us.

A long walk to university in the morning and evening, hours of effort trying to find a job, the excessive amount of learning in an accelerated condition of a new city and the cold whether confirmed my exhausted goodnight no-less-than-5 hours sleep every day. This was the time I found out that I had enough adrenaline to do anything I want to do pushing my physical limits I was aware of. These are the difficult times make a profound change in our lives.

It was an early morning and I was walking towards the railway station through a park close to the boarding I rented. I must have had woken up too early; I had enough time to catch the tube (train). I was feeling good to see frosted grasses shining at dawn sunrise and it's a miracle enjoying these things early in the morning without any coffee or tea in my system. I even had the energy to go out there in the cold and take some photographs on my good old K750i Sony Ericsson phone.

I could look at these pictures at any point of my life and remember my University life. Nowadays, some times when I'm free, I open the code files I wrote when I was in uni and wonder what was going through in my mind when I wrote them. Looking at the past may not be very beneficial thing to do, but it certainly is interesting and should never hesitate to capture our best moments in the present.

Today, I was going through the files to back-up and clean my computer to re-install windows 8 due to avast antivirus screw-up [FYI, Windows 8 won't work when you have Avast Antivirus installed:(]. When I go through the files, I found some of the project files I worked on and lost myself for a while thinking about the days. Some of the project I worked on could have been managed better. Now I realize that the project managing approach I was introduced to had flows.  I managed to get rid of some of the issues I had when it comes to project management and dealing with people. Yeah, I had issues... yeah I certainly did have issues and I still have a few of them I had. Need to spot them, isolate them, take a good look at them and work on them before it's too late. Clock is ticking. Our past's increasing and our future's decreasing. We should record the present while we live it. We should replay the past once in a while to see what we did and move on to the future to do it better.

“We can't solve problems by using the same kind of thinking we used when we created them.”
Albert Einstein

Sunday, September 22, 2013

Logos hope visits Colombo Harbour and I need a tablet.

I ran out of Internet bandwidth for this month. SLT package I have at home gives my family the luxury of 25 GByte worth the Internet serf a month. Should we want to use after the bandwidth limit, we will have an Internet at a 64 KByte per second speed. So, got frustrated try to access my documents on Google Drive and switched off my computer to go see the "Logos hope" ship book fair.
Colombo Harbour
Colombo Harbour

There is always a mystery I feel about oceans or sea. I love big ships and I'm fortunate enough to go in two of the fairly big ones so far in my life. This was truly nice evening for me to visit Colombo port area and the "Logos hope" ship when they are parked in Colombo to showcase and sell books from all over the world. There were roughly about five thousand books and they were fairly reasonable on price. All the book prices were in units. 100 units' equal to 240 Sri Lankan Rupees, by-the-way. Also, I learned that Estelle van Eeden, originally from South Africa but now based in Sri Lanka, finished her two year commitment on the ship last year and she was there for her debut picture book, Lost Things, aimed at four to eight year olds. Logos Hope crew members helped at the launch of the book by dressing up as clowns, painting faces and hands and hanging out with the local kids from Colombo. "The Logos Hope crew have helped make this day awesome for the kids of our community in Sri Lanka," commented Estelle.
Logos hope ship - Colombo Harbour
Logos hope ship - Colombo Harbour

When I looked at these awesomely cool books with cool pictures and all awesome quality papers with the new-book-smell, I badly wanted to buy them, read them, keep them at home, look at them when I feel bored, sell them, buy more of them and want to write some of them best ones once I read enough books to write my own ones.
Colombo Harbour - Logos hope & Tiger Pearl
Colombo Harbour - Logos hope & Tiger Pearl 

So, let me start the real topic of this post. Tablets. If I really want to take my book-reading to next level, I need a tablet. I can't be buying books and taking with me everywhere to read. I feel having a nice tablet would really enhance my lifestyle as a book enthusiastic and wannabe writer. I always felt happy seeing people happily reading books/eBooks on their tablet at coffee shops, restaurants and parks etc.. There are things makes me happy I don't know why and now I just want a tablet. To be honest with you guys, I have two problems. One, I need to find the money to buy the tablet I want to buy. Second, I want to figure out what is the best one for me. There are about dozen good tablet makes and about a couple of good mobile operation systems the tablets use. Now about a few of years I want to buy a good tablet I could take with me everywhere and read, write and do my social networking. Ever since I watch the iPad mini promo video, I have this feeling that iPad could have been a better option. iPhone is awesome, it's just that I can't really do reading on my iPhone. I can't complain iPhone typing.

Colombo Harbour Area
Colombo Harbour Area

Now, I'm looking to buy a tablet that I could,
  1. Use flawlessly to reading things on the Internet.
  2. Better touch sensitivity. Type without getting annoyed with the touch software-keyboard. Physical keyboard compatibility is a must.
  3. Long battery life. I should be able to continually use it without charging at least for a day.
  4. It has to be either android or iOS. Not that I think Ubuntu or blackberry or doesn't do a good job, it's just that I think using an operating system most of others use would be an good option to relate to and talk about. Also, I expect them to grow faster than other operating systems. Windows is not an option. I had a chance to try it and I hate the whole thing. If you ask me, Microsoft sill doesn't understand the basic elements of user friendliness.
  5. use long time (Durability and build quality)
  6. has a better display.(High-definition, anti-glare display)
  7. use fast Internet (Wireless Internet connectivity and mobile broadband)
  8. use GPS satellite location
  9. take some normal shots or videos (I really don't care much about the camera.)
  10. save a lot things (Data storage. not very important. Cloud storage options for backup and syncing data across devices)
  11. have Accelerometer (Detects the physical movement and orientation of the tablet. This allows the touchscreen display to shift to either portrait or landscape mode. In addition, tilting the tablet may be used as an input [for instance to steer in a driving game])
  12. have Ambient light and proximity sensors, which help distinguish between intentional and unintentional touches.
  13. talk to the tablet (Speech recognition - Siri or Google Now)

You guys know how much of a good Google researcher I am, right? So, I used my super-power and did a bit of a research and found that toptenreviews.com published an excellent comparison and 10-9 ? Excellent, 8-6 ? Good,5-4 ? Average, 3-2 ? Poor & 1-0 ? Bad

#1 #2 #3 #4 #5 #6 #7 #8 #9 #10


The new iPad Microsoft Surface Samsung Galaxy Tab 10.1 Nexus 7 Sony Xperia Tablet S Asus Transformer Pad Infinity Kindle Fire HD Motorola Xoom BlackBerry Playbook HP Slate 2

**********
Ratings 10.00 9.93 9.68 9.65 9.50 9.20 9.20 8.68 7.90 7.90
Features









Operating System iOS 5 Microsoft RT Android 4.0 Android 4.1 Android 4.0 Android 4.0 Android 4.0 Android 3.1 BlackBerry Windows 7
Rear Camera 5.0MP 1.2MP 3.0MP N/A 8.0MP 8.0MP N/A 5.0MP 5.0MP 3.0MP
Front Camera 0.3MP 1.2MP 0.3MP 1.2MP 1.0MP 2.0MP 1.3MP 2.0MP 3.0MP 0.3MP
Communication Wi-Fi, 4G Wi-Fi / Bluetooth Wi-Fi, 3G, 4G Wi-Fi Wi-Fi Wi-Fi Wi-Fi Wi-Fi Wi-Fi Wi-Fi
Battery Life (hours) 10 8 10 10 12 9.5 11 10 10 7.5
Warranty (years) 1 1 1 1 1 1 1 1 1 1
Music Player
Accelerometer
Video Chat
GPS
Built-in eReader
HD Video Recording

Hardware









Processor Speed 1GHz 1.3GHz 1GHz 1.3GHz 1.4GHz 1.6GHz 1.2GHz 1GHz 1GHz 1.5 GHz
Processor Cores Dual-Core A5X Quad Core Tegra 3 Dual-Core Cortex-A9 Quad-Core Tegra 3 NVIDIA Tegra 3.0 NVIDIA Tegra 3 4-Plus-1 Dual-Core Cortex-A9 Dual-Core Cortex-A9 Dual-Core Cortex-A9 Intel Atom Z670
Memory 16/32/64GB 32/64 16/32GB + Up to 32GB 8/16 16GB + Up to 64GB 32/64GB 16/32GB 32GB 16/32/64GB 64GB
Built-in Speakers
Built-in Microphone
3.5 mm Headphone Jack
USB
Display









Screen Type Touchscreen Touchscreen Touchscreen Touchscreen Touchscreen Touchscreen Touchscreen Touchscreen Touchscreen Touchscreen
Screen Size (inches) 9.7 10.6 10.1 7 9.4 10.1 7 10.1 7 8.9
Screen Resolution 2048 x 1536 1366 x 768 1280 x 800 1280 x 800 1280 x 800 1920 x 1200 1280 x 800 1280 x 800 1024 x 600 1024 x 600
Height (inches) 9.5 10.81 6.9 7.8 9.5 10.35 7.6 9.8 7.6 9.2
Width (inches) 7.3 6.77 10.1 4.7 6.9 7.12 5.4 6.6 5.1 5.9
Depth (inches) 0.4 0.37 0.4 0.4 0.4 0.33 0.4 0.5 0.4 0.6
Weight (pounds) 1.46 1.5 1.28 0.75 1.26 1.3 0.87 1.6 0.9 1.5

iPad mini
iPad mini
The above table gives us a big clear picture of the feature and user ratings, however, the current superstar iPad mini is not in the comparison and that's my favourite by far. I watched the promo video on YouTube and I feel that this would be 1) very light weight 2) could use a day or two without recharging 3) should fit perfectly fine in my palm 4) could attach a Bluetooth enabled physical keyboard. 5) don't have to talk about the build quality, it's apple:) 6) It has the same screen resolution as the bigger one 7) I could sync the apps and data with my iPhone. Yet, I want to wait for a 64 bit iPad mini. Now that we have 64 bit iPhone with fingerprint scanner, my guess is that we would see a much advanced iPad mini in the near future and I badly want to wait for it. Also, obviously, use the time to save some money for it.

I hope you find this useful or interesting and could think about buying your own tablet. It would be wise for you to list down all the things you want to do with a tablet and compare the features against your budget before you buy. This post might have been a bit boring, if you're not planing on buying a tablet, but hey!, information is wealth:)

Saturday, August 31, 2013

How to keep me up-to-date with the latest technologies?

This is a million dollar question for most of the programmers. Programmers often live in virtual language specific world including myself and when we asked to go to another world, we get annoyed. When we spend years discovering a world and hear about a better one, it’s not a good feeling.

When I talk about keeping me up-to-date with the current technologies, I have to touch a subject called “programming paradigm”. It was interesting listening to Dr Evens’s lecture on “Programming Paradigms” and the stories about how computer languages evolved by time; was very fascinating. Let’s look at the definition of paradigm first, with the help of Google.

Paradigm: "A philosophical and theoretical framework of a scientific school or discipline within which theories, laws, and generalizations and the experiments performed in support of them are formulated; broadly: a philosophical or theoretical framework of any kind"

I have to tell something off topic here, in Virtusa we had an internal seminar organized by our training team and one of the highly experienced trainers, JJ, talked about Paradigm shift and how important that we/companies should cope with it. It has been a while since I attended the seminar and as I remember it, it’s one of the essential and fun things to learn that  the Swiss watchmakers had the paradigm that a watch was a mechanical device, i.e., to be a watch it had to have springs, gears, moving second, minute, and hour hands, etc. The end result was that this research was abandoned because it was not a “real” watch. However, they did put the research on display and when the Japanese companies like Seiko saw it their paradigm was “time keeping device” and they grabbed the digital watch concept and ran with it. The end result was that because of their inability to make a paradigm shift from a watch being a “mechanical device” to a “timekeeping electronic device” the Swiss watch industry almost collapsed because of the Japanese were able to make this paradigm shift. In the seminar then JJ went on to discuss how it is important for a business to know what paradigms it has, to understand them, and, most importantly, be constantly on the lookout for technologies or innovations that can cause a paradigm shift. Why? Because if you miss it you can be out of business.

Coming back to “Programming Paradigms”, first will look at the main paradigms in software industry especially on PP. The first thing I studied in Uni was about the History and the generations of Computer Programming Languages. If we were to skim through the main chapters, we can look through the main four generations with the help of Google. I’m at the moment working using a 4th generation Programming Language  - BPM Workflow manager , PRPC, which uses Java and Oracle in the core engine and enable users to code by just using flows and web based visual controls. Everything else are done in the background from Hibernate-like table class mapping to external system integration.

The first generation program language(1GL) is pure machine code, that is just ones and zeros. Programmers have to design their code by hand then transfer it to a computer by using a punch card, punch tape or flicking switches. There is no need to translate the code and it will run straight away. Code can be fast and efficient and can make use of specific processor features such as special registers, however, code cannot be ported to other systems and has to be rewritten and difficult to edit and update.

Second-generation programming languages(2GL) are a way of describing Assembly code. I have absolutely no idea how this works. Google says that it is done by using code resembling. Assembly code has similar benefits to writing in machine code, it is a one to one relationship after all. This means that assembly code is often used when writing low level fast code for specific hardware. Until recently machine code was used to program things such as mobile phones, but with the speed and performance of languages such as C being very close to Assembly, and with C's ability to talk to processor registers, Assembly's use is declining. Code can be fast, efficient,make use of specific processor features such as special registers and it is closer to plain English, it is easier to read and write when compared to machine code. Here also the code cannot be ported to other systems and has to be rewritten
For example:
ADD 12,8

Even though Assembly code is easier to read than machine code, it is still not straightforward to perform loops and conditionals and writing large programs can be a slow process creating a mish-mash of goto statements and jumps. Third-generation programming languages(3GL) brought many programmer-friendly features to code such as loops, conditionals, classes etc. This means that one line of third generation code can produce many lines of object (machine) code, saving a lot of time when writing programs.
Imperative languages - code is executed line by line, in a programmer defined sequence. Third generation (High Level Languages) codes are imperative. Imperative means that code is executed line by line, in sequence.
For example:
dim x as integer
x = 3
dim y as integer
y = 5
x = x + y
console.writeline(x)
Would output: 8

Third generation languages(3GL) can be platform independent, meaning that code written for one system will work on another. To convert a 3rd generation program into object code requires a Compiler or an Interpreter, Hardware independence, can be easily ported to other systems and processors and programmer friendly, one line of 3rd gen is the equivalent of many lines of 1st and 2nd gen, However, the code produced might not make the best use of processor specific features unlike 1st and 2nd gen.

Fourth-generation languages(4GL) are designed to reduce programming effort and the time it takes to develop software, resulting in a reduction in the cost of software development. They are not always successful in this task, sometimes resulting in inelegant and hard to maintain code. Languages have been designed with a specific purpose in mind and this might include languages to query databases (SQL), languages to make reports (Oracle Reports) and languages to construct user interface (XUL). An example of 4th generation programming type is the declarative language. An example of a Structured Query Language (SQL) to select criminal details from a database. Declarative languages - describe what computation should be performed and not how to perform it. Not imperative!
For example: EXTRACT ALL CUSTOMERS WHERE "PREVIOUS PURCHASES" TOTAL MORE THAN $1000

It gets more interesting than that, now we have a 5th generation concept and which is called 5GL. Fifth-Generation Programming Language (5GL) is a programming language based around solving problems using constraints given to the program, rather than using an algorithm written by a programmer. Most constraint-based and logic programming languages and some declarative languages are fifth-generation languages. Fifth-generation languages are used mainly in artificial intelligence research. Prolog, OPS5, and Mercury are the best known fifth-generation languages.

Let’s look at the big picture, the big-bang of languages:
big-bang of languages
big-bang of languages
Thanks: http://www.cse.chalmers.se/~bernardy/pp/Lectures.html#sec-1

These paradigm-shifts happen so fast in our industry more than in any other industry. Not only software or programming languages, but also hardware. When I was developing websites half a decade ago, I only had to worry about computers and screen resolutions. Now, we have mobiles, tablets, computers, many other screen dimensions and device capabilities to worry about. Devices and its capabilities are getting sophisticated every day and software industry also growing very fast trying to serve the devices well.

We, programmers, could learn a concept or programming language or a design pattern today and it might well be discarded tomorrow. If you disagree with me, ask about what happened to me have studied Macromedia/Adobe Flash. Those days I was crazy happy making websites using flash , now I don't even have flash installed in my computer.

So, how do we deal with this problem? To be honest, there are more than one questions associated with this question. Before we try to answer this question, we should ask some questions ourselves to get the context right. For example, what I exactly want to do? We could just say, I'm a programmer, but we can't be just coding in every programming language or be doing everything out there falls in the software programming category.  I believe, to succeed in our industry, it's vital that we should be specific about what we want to do while having the firm understanding of the fundamental concepts. We should choose very specific areas of our profession and should get certified and should know everything possible in that specific area. Choosing very specific areas to excel and succeed has its risk, yet I don't think there is anything we could do about it. We should just be willing to take the changes as we grow. As I already mentioned a million times in my blog, I'm now working in BPM steam using Pega tool and I know it's a big risk, if there would be a better Business Process Manger out there in the market tomorrow. So,outside my work hours, I try to keep me aware of the other things happening out there in the dark.

Also, I think, it's important that we should be absolutely clear that agile is turning into a mainstream methodology, and soon only a few extinct mammoths will do waterfall. Agile has won the race. Microsoft is now working to improve agile methodology support many of its products, they also do iterative development for many of their products. IBM has launched Jazz agile platform. Pega supports mainly that.

Software is not like any other product it is often compared to. It is fundamentally different from a car or a house.  Every project is different, even if only the team is different, so there is less predictability. The industry is small, fast-moving, and there is no complete well-known set of templates and methodologies that guarantee timely delivery of a wide variety of tasks – simply because many of the best methodologies, practices, and platforms and tools are a work in progress.

So, I think, including myself, we should just stop worrying about keeping us on the edge and just keeping doing what we love doing and not to ignore the major changes. To me, It's very important to be in every race than winning a race and backing off for the next one. I see successful people in the industry, they still only know BASIC or PASCAL language.

I could give you some pointers that I think might be useful for you. In the classical sense, if you like to keep you up-to-date on your industry, you should find ways to stay informed. Many of us work in changing competitive environments. If we don't keep up with news and trends, we can miss key opportunities and can be caught unawares. That's why, for some of us, it's important to keep-in-touch with news and trends in our industries. Although keeping up with industry news may seem to be just one more thing to add to your To-Do List, there are several important benefits. First, you'll make better decisions, and you'll spot threats and opportunities early on, which can give you a competitive edge.

So how do we stay informed to keep us up-to-date..?

  1. We should find a mentor. I have a few people, I look up to. A great starting point is to find a mentor within the place you work. Not only can mentors help you solve career issues and develop your career, they can provide you with a wealth of insider knowledge, as well as with the insight needed to understand it.
  2. Subscribing to some popular magazines those could help us be informed. Our industry may have one or more trade organizations that you can join. These are useful, because they can help to keep you informed with their newsletters and publications, and they provide networking opportunities with meetings and conferences.
  3. Seminars and conferences are great for learning about new technologies, new products, and industry trends; and they can provide ample networking opportunities.
  4. Having tech friends outside work can be one of the most rewarding ways to stay on top of industry news and trends. We could have a wide pool of people to network with. People directly related to our industry are an obvious choice, but so are industry related people, customers, and people working in related fields.
  5. Blogs aren't just for personal journaling anymore. Many bloggers are respected for their high quality work and honest opinion. Whatever I write happens to just be the solutions I find to the problems I face and I know my friend and readers could relate to them.
  6. Keep Google, Twitter, LinkedIn and tech forums in your pocket. Yeah I'm saying it's a must that you have a smart phone:)
  7. Making Time, Sharing and Using are the last and not definitely least tip I could think of to keep us up-to-date.

Thursday, August 15, 2013

What programming language should I choose to excel on and why?

The first software package I ever learned is Microsoft Excel in 1997 at my school, Jaffna Hindu College. Some of our old school union people thought that the young pupil in our school should learn computer. I’m grateful to my school and I should write about my schools in another post. Computer was a very alien idea at that time to me. Probably to most of them in Jaffna. At school they plugged the computers up and showed us as an exhibit first. The Pentium D computers had Windows 95 as I remember. After months they let us touch it and play with it, that we would go in there and with instructions, we would left click on the start and go to programs > accessories and open word pad to type our names. We did this for couple of months once a week for a class period after lunch break on every Friday. It's very exciting, not having electricity at home and to experience this miracle machine for about 40 minutes every week.

In 1998, Thanks to Dugles Devanana, a politician at that time in Jaffna, had an institute opened to study computer called ‘IT Park’ and I joined with my parents support to Study Microsoft Excel. Ever since I clicked on the ‘Start’ button, everything excites me when it comes to computer. Everything’s still an absolute magic and as intact nothing understandable. Then over the cause of last 15 years, I have learnt number of programming languages. The main ones are PHP, Flash Action Scripts, ASP, JAVA and .NET. It’s really a headache to decide as to which one to go for when I start a new project.

I spent my early tech life praising php. It is still a great language for many specific type of web development. Easy to learn, easy to use, free, widely used, most hostings support, simple and sweet. Hosting applications on low budget or deploying /changing the hosting location is extremely easy and I never had any issues deploying. However, PHP is not great at scaling in terms of programming. The main problem with PHP isn't that it's not scalable. The problem is that the majority of PHP coders don't have a clue about OOP, design patterns, coding standards and simply don't know how to write scalable code although it's perfectly feasible in PHP.

For small applications, though, J2EE and .NET can really be overkill. In Java, a lot of time needs to be spent configuring and tuning Hibernate, struts-config, etc, so simple CRUD applications are usually done best in PHP.

So, it would be unfair to compare PHP with Java or .Net. PHP is best to develop simple sites. I think, we should only compare Java and .NET due to the similarity and the capabilities.

Both multi-tiered, similar computing technologies, both support “standards”, both offer different tools & ways to achieve the same goal. A lot of parallelism can be seen. Very difficult to compare and qualify the comparison because each has its own advantages & disadvantages.

So, when I think about Java,
  1. Truly platform independent.
  2. Free(very much) and Open Source (very little).
  3. Loads of libraries and APIs available.
  4. According the Java Update Advert, more than 3 billion devices use Java.
  5. Very secure and stable, but comparatively slow.
  6. True object oriented.
  7. Methods are virtual by default and static imports available.
  8. Instance-level inner classes and interface for enums.
  9. As far as I see, more job opportunities.
  10. Many major applications are written in Java. (For example, I’m currently working on Pega BPM suit and it’s extremely sophisticated and purely written in JAVA.)
  11. Easy integration to new devices without the need to have windows.
And .NET (C# mainly)
  1. No automatic fall-through from one case block to the next.
  2. Strongly-typed enums.
  3. By reference calls are explicit at caller AND callee.
  4. Method overrides are explicit.
  5. Supports versioning.
  6. Structs (value types).
  7. Integrated support for properties and events.
  8. Can still use pointers with RAD language.
  9. Can share data and use functionality with components written in many different languages.
  10. Unsigned integers.
  11. High precision decimal number.
  12. Complex numbers.
  13. Value types.
  14. Lifted (nullable) types.
  15. Tuples.
  16. Pointers.
  17. Instance-level inner classes.
  18. Statement-level (local) anonymous classes.
  19. Enums can implement interfaces.
  20. Object initializers & Collection initializers.
  21. Explicit interface implementation.
  22. Reference (input/output) parameters & Output (output) parameters.
  23. Runtime realization.
  24. Value/primitive type constraint.
  25. Constructor constraint.
  26. Primitive/value type support.
  27. Method references.
  28. Closures.
  29. Lambda expressions.
  30. Expression trees.
  31. Generic query language.
  32. Late-bound (dynamic) type.
  33. Runtime generics realization.

I feel lucky to have chosen this career path that I often get to have fun coding and doing many fun things, yet there is one thing is really annoying. New immature technologies quickly be able to gain popularity and kill giant technologies or treads. We spend learning a language taking years and by the time we become competent, there would be a new and better programing language getting attention. I have been coding in PHP, Java and in C# the last decade and the fairly new languages ROR and GO makes me nervous.

Just to write this blog post, I was reading about Go lang and Ruby on Rails. As far as I read, it’s a bit tough to write something sensible on Go with my knowledge. I understand that it’s an improved C and not a pure object oriented language, more of procedure language. Google initiated and developing to handle it’s “Big Problems”. I don’t see any big company using other than Google and the online resources and learning materials are limited.

On the other hand, ROR is now becoming extremely popular and I see why. I really want to learn ROR for many good reasons. Ruby is a programming language, and Rails is an application framework that uses Ruby. ROR lives by the principle that "convention over configuration" which is something I'm still struggling to understand. Rails is written in Ruby, which is a language explicitly designed with the goal of increasing programmer happiness. It is very true.

Now about 2 to 3 hours I’m trying different different code techniques on ROR and it’s truly a joy coding. Please check the code below and if you could think of a C# or PHP or java version of it, you will understand what I’m talking about. I guess, you could really have fun coding once you started off with ROR.

describe Bowling do
before(:each) do
@bowling = Bowling.new
endit "should score 0 for gutter game" do
20.times { @bowling.hit(0) }
@bowling.score.should == 0
end
end
So to conclude the first question I had in my previous post, I’m going to say, programing language choice should really be about the project we are going to be working on considering the,
  1. Complexity.
  2. Scale.
  3. Type of project.
  4. Resources needed.
  5. Performance and security.
However, I would want to make myself really family with .NET to work on medium or large scale projects with enough budget and ROR to work on small and medium size projects with considerably low budget.

.NET to have ROR style of programing would be my dream.