07
Oct
08

The Multi-Dimensional Software Engineer

I am an Electronics and Communications Engineering graduate. When I was 10 or 12, I got fascinated with computers and learned how to code BASIC (Beginners All Purpose Symbolic Instruction Code.). My father introduced me to transistors and electronics by the age of 13 or 14. Nothing impressive as compared to the proteges I read on the news but good enough I guess to spark the fire within, so to speak.

I am currently deployed in Japan, working as an outsourced engineer. Be it so, I take pride in my job and the skills acquired as an outsourced Japanese speaking / writing engineer. (hahahah my nihongo is really embarassing, but my japanese friends say it is enough for now.)

For the past 7 or 8 years, I had been into firmware programming. I have met some of the most brilliant engineers both in Philippines and Japan. I have evolved from the “if-then” ( of BASIC to the “int main()” single thread of non-RTOS “C/C++” to the more complex multi-process multi-thread world of RTOS. I have coded several firmware specifically geared towards networking and some stuff with the Operating System/Kernel. In my current level of learning, I have come to the following conclusion that :

“A software engineer is multi-dimensional. It is fascinating, dumbfounding and very complex!!!”

I want to be good at what I do. I try to study as much though I may not live long enough to study everything. :D In my long list of things to study, are the following :

  • Basic and Advacned UML – I know UML but not that great at it, I want to be good at this one.
  • Extreme Programming – Need to learn so that I can execute at will.
  • CMMI – (Capability Maturity Model Integration) Industry standard on development approaches
  • Java(SE) – hahahah my good friend Abraham suggests this. And i think it is time for an upgrade on my part.

Before you proceed though, I want to caution you. What you might read here may be impossible to you as of the moment. But I hope you fear not the many challenges that you will face in your journey towards whatever visions you may have. Focus more on the joy of obtaining the skills through hard-earned study and effort. My Physics teacher once taught me, that “There is no room in learning when there is fear.” So fear not because it is difficult but hope that you may grow. Never compare yourself with others but compare yourself to yourself the day before yesterday. :) So what if we all may not learn it all, but for the very least we have done due dilligence over what is asked of us as professional Software developers.

And should you be the type not motivated by optimism, Fear THIS : “The day will come when you will be measured. And the people hanging on the balance might be your wife and kids or probably a lifestyle you have grown accustomed to. Should you fail on that day, or should you be found wanting in the amount of dignity you put into your profession, I assure you the backlash will be so great that you will never ever grow out of it. An indellible, scar to your sense of professionalism.” The lack or preparation is the kiss of death, as one of the TV sitcoms (Will and Grace???) once said. Did I scare you enough? :) hahahah so be OPTIMISTIC. :D

Do we need to be perfect? Hell NO! I too make tons of mistakes, some really really embarassing. Basic coding misses and vague design specifications are but some of the many mistakes I make on a daily basis. But be that as it may, our will to do things right (never repeating my mistakes) and the conscious effort to learn so that we can do things right, are more important than anything else. And that shines beyond our mistakes.

With that said, as far as I have read and learned personally, I write my learnings here. My learnings I share with those who deem themselves of lower skill level than I am and also for those better than me so that I can correct my viewpoint/s. I share this so that those who aspire for more can use all or parts of it, for their growth.

In my opinion, a software engineer’s dimension is as follows :

  1. Test Engineer – As essential to the design the code and almost everything else.
  2. Programmer – Of syntax and discipline.
  3. Developer – Of designing and planning micro, mini and large scale modules.
  4. Administration Quality and Process Engineer – Of hastening the work flow process and at the same time increasing quality levels
  5. Architect – Of designing micro, mini and super scale architectures on which all other modules will base on
  6. Inventor – Of creating wonderful new technologies.
  7. Technocrat – Being “THE MAN”, Defending the business interests with superior technology

1. Test Engineer – Any engineer should be a good tester. My point here is simple, testing is an imperative step within the software development life cycle. The ability to create test routines should be fundamental to any engineer. And such tests should cover normal branches and to an EXTREME extent hypothetical cases which may have very low probability of happening. The better the testing mentality of the engineer, the higher the possibility that the code will be robust. Let me set an example :

/********** Code version 1 ***************/
int32 SafeStringLen(char *my_string)
{
return strlen(my_string); /* where string
}

Any coder who thinks about test cases even before coding should realize that “my_string” has many possible values. And one of those values is NULL. Thus, with the above code, if “my_string” is null, strlen will crash into oblivion. My point being is that, the above code, to be able to achieve its best form, must be subjected to some form of mental agitation, a rigid test within the cranial fluids or mental-what-nots of the programmer.

One simple rule : EXECUTE WITH A TEST IN MIND!

WARNING : Testing rigidly does not mean we test redundantly and stupidly. For example, in the above code, you dont have to test all possibilities. Basically as my normal rule follows there are four basic points to test.

  • Lower than allowed  – values BELOW the range
  • More than allowed  – values BEYOND the possible range
  • Normal cases – valid values / test cases
  • Exceptions  – hypothetical cases

So if I were to test the above code SafeStringLen():

  1. Lower than allowed – Not Applicable in this case
  2. More than allowed – In heap I will allocate 2MByte and then fill it up with “1″, with last character set to the NULL Terminator. And then test.
  3. Normal cases – (a) my_string = “abcde”  (b) my_string = “ab” (1 or 2  normal flow tests will be fine)
  4. Exceptions / Special cases :
    1. my_string = NULL
    2. Zero-len string : my_string[0] = ”
    3. my_string = “abc” and then place the cross-compiled code in a big endian system ()

Remember that tests usually consume alot of time. And time costs money. That is why, any software engineer should be good in testing to minimize cost, while maximize robustness of codes.

2.     Programmer – As far as I am concerned, coding should be a software engineer’s passion. Coding’s focus is more on the programming language one is handling. For example if the design asks us to implement a dynamically created data, a coder, at his or her disposal should be intelligent enough to chose which one is best for a particular language. For Example :

/* C Language create dynamic data */
#include <stdio.h>
#include <malloc.h>
struct MyStruct {
  int32 a;
  int32 b;
};
int main()
{
  struct MyStruct *sample = NULL;
  sample = (struct MyStruct *)calloc(1,sizeof(MyStruct));
  if (!sample) {
      printf("calloc has failed!");
  }
  else {
     printf("calloc has succeeded!");
  }
  return 0;
}

6 Important points :
1. In the initialization of the pointer, “= NULL” is used. (NULL) wont work with pure C compilers.
2. And as a coder, I prefer calloc over malloc.
3. The tester in me knows calloc or malloc can fail that is why I check it.
4. In C compilers  “/* */” is the generic form of commenting.
5. main() should never be void, most use integer as return type
6. my current environment supports zero as successful operation so i return 0.

/* C++ Language create dynamic data */
#include <stdio.h>
#include <new>
struct MyStruct {
  int a;
  int b;
};
int main()
{
  struct MyStruct *sample(NULL);
  sample = new(std::nothrow)(struct MyStruct);
  if (!sample) {
      printf("new has failed!");
  }
  else {
     printf("new has succeeded!");
  }
  return 0;
}

5 CRITICAL points :
1. sample_struct(NULL) will work this time.
2. new() is used to create dynamic data, without the use of type casting.
3. the test for failure is used by throw(), (try-catch can also be used here)
4. For commenting, “//” can be used.
5. “std::”,this is in reference to the std namespace of C++

NOTE : I am not really a C++ developer. And the throw part is really new to me. I just learned it today. So from now on I will use it. :) . As for the old codes, I feel guilty about them.

Anyways, this level for me is the hardest to measure. But the bottomline here is that, any coder judges well what commands, impliments and sequences are to be used. He watches out for fork() and execv() calls which messes up processes (and raises zombies) and other system calls/commands with debilitating results (if not done properly). A good coder can easily see through problems within the code, moreso also find other ways to generate the same result with different sets of commands. As in the example above. It is imperative for a software engineer to obtain the discipline of a good coder before he or she progresses to the next level.

In my opinion, the following candidates have good chances in becoming good coders :

1. People with good command of the english language. (Specifications of syntax are almost always in english.)
2. People with good mathematic skills. (Mathematical solutions are architecture independent.)
3. Regardless of 1 and 2, people who aspire to be good coders, who study by reading, reading, reading, coding, and coding. :D

Note : Recently I took a C/C++ exam. I got a score of 35 / 50. Not bad, but that means i have a great amount of learning ahead of me. The test I took online, was an amalgam of C and C++. Next Time I will take the paid exam. Also, next year I intend to take java certification as I was irked by the sad state of affairs of one of our projects in my organization. And for an upgrade on my part.

Next Time : The Continuation … (well once I have time … )

free counters


0 Responses to “The Multi-Dimensional Software Engineer”



  1. No Comments Yet

Leave a Reply