Leading a Team of Software Engineers

I have been an Associate Manager for almost 3 years now. I have been learning the ropes in management. It’s been a breeze planning the work of a team of 4, but now that my manager is temporarily away and unable to work, I am left with 5 additional team members to manage and reporting to higher bosses.

I am reflecting and trying to think of smarter ways to increase my own productivity and the team’s. We have targets we need to meet and we also need to be able to quickly resolve Production issues as they arise.

Now, more than ever, my people and time management skills are needed. I also need to adapt and find ways to ensure high quality code is delivered to Production in every release so that we are not stressed out with issues. And of course, so we maintain or increase client satisfaction with our product.

This weekend, I will set aside some time to think of producing highly effective and productive teams of software developers.

Failed the Interview for the Job I am already Doing!

Before I left for our California vacation, I had an interview (internal to ACN) for my local transfer. I requested to be transferred from Global Careers Program (Philippines) headcount to local Austin (North America) headcount.

I did not prepare. I thought it was just “for formality’s sake” because, heck, I am ALREADY doing the job! I am trying to interview for the job that I am already doing! I squeezed in the interview into my schedule. I was thinking, they’re just going to ask me about things I am already doing at my role.

I breezed through the first set of questions, about what I do daily, how many direct reports I have, etc. And then the interviewer probably looked through my resume and asked me questions about Spring. Spring! Ugh, Spring. I always panic when interviewers ask about Spring because I feel like I am not able to explain it well. So there my downfall began. Then he asked me about the software that I have been working on for almost 6 years now. Then the platform. I was not able to explain the whole project to him fully.

So there it goes… I had a feeling in my stomach that I flunked that interview. But still, I was thinking, oh well.. it’s for formality’s sake.

To my horror, I learned from the recruiter that my request for transfer was not approved. She said, I “lacked Java expertise”, that from the interview, they did not see me fit for the role because I didn’t demonstrate “deep knowledge of Java”. 😦 Sad.

She added that I need to be skilled with “Java in the New”. Pivot to the New IT with Java.

I need to practice before I head out to interviews. I need to assume that I will fail the interview and try to pass it like it is a certification exam. Next time, I will do better. If it takes me 20 interview failures to get to my next project, heck, be it.

Next Steps:

  1. Get AWS (entry level certification) certified by December 31, 2019
  2. Get Java interviews (for practice)
  3. Update resume
  4. Review basics
  5. Keep on getting trainings on Udemy

Thinking about how to be a better software engineer

Whenever I’m asked what I do for a living, I often say I am a software engineer. But am I really close to being a good one?

I looked around the net for some tips/pieces of advice to becoming a better software engineer and I got the following:

  1. You’re paid to THINK. by Eric Hexter
    If you normally get your requirements verbally, try writing them down.
    Write down your requirements or technical plan in the easiest manner possible. That could be on a whiteboard, you could annotate a screenshot of an existing screen, you could use pencil and draw the changes to a print out of a screen shot.  Just do something in terms of thinking about what needs to be done before you start typing.  If you do write down what you plan to do, you can actually communicate it to other developers. You can have someone else review it and think through the problem.  You can also show it to the person who will decide if you created the correct software, imagine getting some feedback on what you want to build before you mess it up?

    The two most valuable ways I have found to write down what needs to be created are Screen Mockups and Sequence Diagrams. Now, I have been in the web space for a long time, so if you are not creating websites, or web applications, you may find that there are better ways to write down what you need for your particular design problem.  Either way , try to write it down. If you are writing mockups today, then add a sequence diagram for the more complicated problems and see if it helps.  I know it helps me and the developers I work with.

  2. Go, Solve Problems by Derick Bailey

I’m paid to solve problems consistently and reliably, and either implement the solutions through software or recommend a solution that doesn’t involve software. If I solve a problem once, but the solution breaks or is not repeatable after that one time, I have not done my job. If I solve a problem 100 times, add more code to try and solve a second problem and end up breaking the first solution, I have not done my job. My job is done when I can consistently and reliably solve the problem in a manner that either adds value or reduces cost. You are not paid to write software or tests. You are paid to solve problems and you happen to do it through software (and tests).

3. Learn to deal with people by John Sonmez

The basic problem is that humans are not logical creatures, we are emotional ones.  Sure, we like to pride ourselves on our ability to reason, but the reality is that most decisions we make are more influenced by emotion than reason.

What this means for you as a software developer is that unless you can effectively deal with other developers, managers, and even customers, you will constantly face trouble despite how good your ideas are or how valuable your skills are.

Being active and involved in the software development community in general can also help you immensely in your career.  It is not just about networking, but getting your name out there and building good Karma.

4. Understand the business of your customer by Markus Sprunck

How can you design and implement good software without deep understanding of the purpose or use? The answer is easy: “If you don’t know the WHAT, you can’t decide about the HOW.” A deep understanding of your customer’s and/or users’ businesswill lead to better requirements, designs, implementations and tests.Most of the software’s functionality creates no business value. The challenge is to select the functionality which creates business value. The better you know the business the higher is the probability to implement the best system.

5. Don’t Trust Code without Adequate Test by Markus Sprunck

Ten years ago, I trusted my code. Why not? After 8 years C++ with excellent skills and a lot of experiences. I just coded, tested and everything was working well. But over the years I made and saw a lot of errors. Because of these errors, I lost the trust in my own and others code.

Today, I don’t trust code until it passed:

  • unit test,
  • integration & system tests,
  • checks of performance and memory with real world data,
  • static code analysis,
  • measure code coverage of test,
  • load & stress tests and
  • peer review.

Got my Oracle Certification: OCJP, Java SE 6 Programmer Success Kit

Yey! I finally got my OCJP 6 Success Kit:

Why get certified? Well.. for a course like Information Technology, which doesn’t have any board exam, we rely on these certifications to prove to future employers that we have the skills that they are looking for. It’s only one of the passports/tickets to success. I am of course, fully aware that it’s not necessary for everyone to have this. I have teammates and friends whom I know are highly skilled in Java (and other programming languages) who don’t get certifications at all. But it’s also a bonus to add to your resume.. 🙂

Choosing your career

Graduation season is over. Now it’s time for most new grads to look for work and enter the real world. Some may be fortunate enough to inherit their family business or continue their budding online business/jobs but most would be out in the job market and lining up in job fairs and interviews.

Last week, I read very good articles from Philippine Inquirer about Very common (and very bad) ways to choose a job by Ernie O. Cecilia. It’s a very good article for people who are actively seeking employment. And another article entitled ‘Art of successful career shifting’ by Tita Datu Puangco, is a good read for those who are thinking of switching jobs.

An excerpt from Very Common (and very bad) ways to choose a job by Ernie O.Cecilia of Philippine Daily Inquirer

…never let anybody dictate what career is suited for you. If you let him or her, it’s just like letting a judge sentence you to an imprisonment for 40 years in a career not of your own choosing, perhaps based on needs of the economy. Your preferences, passion, training, inclinations, goals and aspirations are never a factor in the choice. You could end up in two ways. If lucky, you could get your dream job. If not, you’re doomed to 40 years of hard labor or a lifetime of meaningless routine in a dead-end job. Worse, you won’t last 40 years – you could die of career stress, dental diabetes or other lifestyle illnesses while trying to escape from boredom.

Like it or not, there are millions of people who found themselves in jobs they hate because they never really  made a good choice. Today, they plod aimlessly as they drag their feet to work, not knowing why they do what they do. Their advocacy is for more holidays. Their wish is that Congress should reduce the workweek to 3 or 4 days, and have as many paternity leaves as there are maternity leaves.

…Be constantly aware of things that stand in your way to finding your dream job. Sometimes, the people you love, and the people who allegedly love you, are often the stumbling blocks that deter you from pursuing the career that’s best for you.

Useful Tips

  • Know your passion. Life is short. I see no point in doing something you hate to do. Many successful people are happy doing work that makes them happy. Look inside you. What are your interests? What type of work makes you happiest? What were your childhood dreams? Get a job and start a career by pursuing your passion. Of course you must temper you passion with the reality of available jobs. Where possible, don’t compromise. If the job you want does not exist, you can find a way to invent it. If there is no employer that offers the job you want to do, you might just start your own small business. I think it was George Burns who said, “I’d rather be a failure at something I enjoy than a success at something I hate.”
  • Know your competencies. What skills have you learned and developed in school, at work, and at play? The natural tendency for graduates is to pursue a career related to their major in college. Let me disabuse your mind. There is no law that requires you to take a job or start a career related to your major in college. For all we know, you made a wrong choice of your major.
  • Understand your priorities. A job or career is just another part of your life. Life has several aspects. Understand your priorities in life and focus on them. Often, life asks for trade-offs as you journey. Always know your priorities. Always try to maintain some balance in the many passions that you may have. Life’s journey could mean two steps forward, one step backward. The operative word is “balance.”
  • Choose your destination. A career is not just a job. Like life, it is a journey. You’re back to the question that once lost its sex appeal for you, “What do you want to be when you grow up?” (My tip: Visualize what you want to be, where you’ll be and what you’ll be doing when you’re 50, 10 years from now, 5 years, or a year from now. It will give you a glimpse of your future…a vision. 🙂 )

–end of excerpt

How did I choose my career as an IT practitioner?

When I was young, I remember answering the question, “What do you want to be when you grow up?” by saying that I want to be a doctor. I can still see the evidence in my grade school yearbook: Mylene’s dream: to be a doctor. However, when I was in high school, I realized I dreaded wearing the lab gown and I didn’t like “inoculating bacteria” or “dissecting a cockroach”. I couldn’t stand it. My microbio teacher would glare at me when I let out a scream when the supposedly dead cockroach starts to move. And I wanted to throw up when I saw moving organisms under the microscope when we placed a sample specimen from the tummy of the cockroach. Ewww!!!

But when it’s time for computer class, I get excited.  I especially enjoyed making the sophomore Comp Sci project of the school logo in Turbo Pascal. My project wasn’t that good but my classmates’ projects were awesome. I was fascinated at how they were able to program the colorful lines and circles to move and rotate and form the logo. Oh, I fell in love with computers then.

During my junior year in high school, we were asked to create a mini computer system. I and my two groupmates chose to create a “gatepass” system for our dormitory. A little background: since we came from different parts of Mindanao, we stayed in the girls dormitory inside our campus. We were not allowed to go out during weekdays but we can file a gatepass during weekends if we want to go to the city or go home. The dorm manager has to check our consent forms to know if our parents allow us to go out without a “sundo” or if we are allowed to stay overnight at our friend’s house during the weekend.

Anyway, that project kept me up for many nights. My two groupmates hated comp sci and loved biology so it was a great opportunity for me to work on it. While they focused on working with our thesis partners – rhinoceros beetles larva and green muscardine fungus, I opted to work with the computer most of the time. That’s the time when I felt that I wanted a career with computers. At that time, I badly wanted to be a software developer. So when I was in college, I enrolled in the Information Technology course. My highschool groupmates ended up as a nurse (now working in UAE) and the other one, as a chemistry engineer (in Cagayan de Oro).

I will confess something. When I was in my senior year in high school, I wasn’t very sure of the course I’m going to take up in college. In different colleges/universities that I applied to, I wrote a different course. In UP Dil: Chem Eng’g, UP Los Banos: Applied Math, Ateneo: Comp Sci, MSU-IIT: Statistics. But a week before I enrolled in MSU-IIT, my uncle asked me what subjects I liked in high school. And I answered, Comp Sci and Math. And he told me to enroll in Information Technology. I protested, “Huh? Information Technology? I don’t want to be an encoder! Or a receptionist in some hotel!” Haha. I seriously didn’t have any idea about IT during that time. But when he told me that I’d be working on computer programs and mathematics/logic, I was sold to the idea. And the rest is history.

Am I happy with what I’m doing right now – as an IT practitioner?

Yes. At times, my work can be stressful and sometimes I get the feeling that I still have so much to learn and so many skills to acquire and develop, but at the end of the day, I still feel that I made the right choice. I still lack a lot of skills but I’m betting that this would be easy, knowing that my interest and passion lies in it. 🙂

How about you, are you happy with what you’re doing now?

Java Tutorial Vol.1 Part 2

I hope you now have established a connection to your MySQL database using DBConnector from the previous tutorial. By the way, here is the database schema in case you haven’t located it on the home page flash widget:

CREATE TABLE `acct_type` (
`acct_id` INT(10) NOT NULL AUTO_INCREMENT,
`acct_desc` VARCHAR(20) NOT NULL,
PRIMARY KEY (`acct_id`)
)
ENGINE=InnoDB
ROW_FORMAT=DEFAULT
AUTO_INCREMENT=4

CREATE TABLE `accounts` (
`username` VARCHAR(20) NOT NULL,
`password` VARCHAR(20) NOT NULL,
`acct_type` INT(20) NOT NULL,
PRIMARY KEY (`username`),
INDEX `user_acct_type` (`acct_type`)
)
ENGINE=InnoDB
ROW_FORMAT=DEFAULT

CREATE TABLE `team` (
`team_id` INT(10) NOT NULL AUTO_INCREMENT,
`team_name` VARCHAR(10) NOT NULL,
`team_leader` VARCHAR(10) NOT NULL,
PRIMARY KEY (`team_id`),
INDEX `FK1_team_user` (`team_leader`),
CONSTRAINT `FK1_team_user` FOREIGN KEY (`team_leader`) REFERENCES `accounts` 

(`username`)
)
ENGINE=InnoDB
ROW_FORMAT=DEFAULT

CREATE TABLE `logs` (
`log_id` INT(10) NOT NULL AUTO_INCREMENT,
`username` VARCHAR(10) NOT NULL,
`log_start` DATETIME NOT NULL,
`log_end` DATETIME NOT NULL,
`log_description` VARCHAR(50) NOT NULL,
PRIMARY KEY (`log_id`),
INDEX `FK1_log_user` (`username`),
CONSTRAINT `FK1_log_user` FOREIGN KEY (`username`) REFERENCES `accounts` (`username`)
)
ENGINE=InnoDB
ROW_FORMAT=DEFAULT
AUTO_INCREMENT=4 

Next, we are going to create a class named LoginManager.

/**
*
* @author Mylene E. SereĂąo
*/
import java.sql.*;
import javax.swing.JOptionPane;
public class LoginManager {
private Connection conn;
public LoginManager(Connection conn) {
this.conn = conn;
}
protected int login(String username, String password) throws SQLException {
ResultSet rs;
String userPassword;
int result = 0;
try {
PreparedStatement ps = conn.prepareStatement(“SELECT acct_type, password from accounts WHERE username=?”);
ps.setString(1, username);
rs = ps.executeQuery();
if (rs != null) {
rs.next();
userPassword = rs.getString(“password”);
if(password.equals(userPassword)) {
result = rs.getInt(“acct_type”);
}
}
}
catch(SQLException sqlEx) {
sqlEx.printStackTrace();
}
return result;
}
protected String getPassword(String username) throws SQLException {
ResultSet rs;
String userPassword= null;
try {
PreparedStatement ps = conn.prepareStatement(“SELECT password from accounts WHERE username=?”);
ps.setString(1, username);
rs = ps.executeQuery();
if (rs != null) {
while(rs.next()){
userPassword = rs.getString(“password”);
}
}
}
catch(SQLException sqlEx) {
sqlEx.printStackTrace();
}
return userPassword;
}
protected String getAcctType(int acctType) throws SQLException {
ResultSet rs;
String type= null;
try {
PreparedStatement ps = conn.prepareStatement(“SELECT acct_desc from acct_type WHERE acct_id=?”);
ps.setInt(1, acctType);
rs = ps.executeQuery();
if (rs != null) {
while(rs.next()){
type = rs.getString(“acct_desc”);
}
}
}
catch(SQLException sqlEx) {
sqlEx.printStackTrace();
}
return type;
}
}

In this class, the constructor has a Connection parameter so that the objects of the class would be able to connect to the MySQL database through it. It has a method named login with parameters username and password and which returns an integer (account type).

What is a PreparedStatement?

A PreparedStatement is . It allows you to create dynamic queries. Question marks ? are used as placeholders for values of fields in queries.

Example: PreparedStatement ps = conn.prepareStatement(“SELECT acct_type, password from accounts WHERE username=?”);

You can then set the value of username by using: ps.setString(1, username); username in this case is the parameter passed to the method. The first attribute of setString which is the integer 1 is the ID of the fields in the PreparedStatement.

If there are more unknown fields in the query, example: PreparedStatement ps = conn.prepareStatement(“SELECT acct_type from accounts WHERE username=? and password=?”), then the next statements would be:

ps.setString(1, username);
ps.setString(2, password);

or ps.setString(1, ‘mylene’);
ps.setString(2, ‘thisismypassword’);

A ResultSet object is returned when an executeQuery is performed:
rs = ps.executeQuery();

You can then use the while loop and the next method to access each row in the ResultSet object. However if there is only one row returned by the query, you can skip the while loop.

if (rs != null) {
rs.next();

Next, you can access each field in the row by using methods such as getString and getInt to get Strings and integers correspondingly.

userPassword = rs.getString(“password”);

You can use the name of the field (such as password) to specify which field you want to retrieve or use indexes instead – example, userPassword = rs.getString(2);.

Java Revisited: A Tutorial for My Students Vol.1 Part 1

I have promised my former students that I would give a tutorial on Java because they wanted to learn more about it. I know that this has already been delayed but I hope this little tutorial series on Java/MySQL would still be helpful. =) If you find some errors/glitches in the code, please feel free to post a comment. Or if you have any suggestions on how to improve this, please let me know. Thanks!

First off, I’d like to let you know the tools and platforms that I am using.

– JDK 1.6
– NetBeans IDE 6.1
– MySQL (bundled with WAMP)
– HeidiSQL (a lightweight, fast, and flexible interface to MySQL)
– Windows XP

For this tutorial series, I would expect that you already have a working knowledge on Java and databases (specifically MySQL), and an understanding of object-oriented programming. We will start with a mini project entitled “Time Management System”. I have chosen this mini project for simplicity.

We have 4 tables in the system. Accounts, Acct_type, Logs, and Team. Using HeidiSQL, create a database named tms with this schema (will be posted on the flash widget: right side of My Lane page).

First, we will create a class for database connection and we will name it DBConnector.

/**
*
* @author Mylene E. SereĂąo
*/
import java.sql.*;
public class DBConnector {
private String url;
private String user;
private String password;
private String driver = “com.mysql.jdbc.Driver”;
private Connection conn = null;
public DBConnector(String url, String user, String password) {
this.url = url;
this.user = user;
this.password = password;
}
public Connection connect() throws Exception {
try {
Class.forName(driver);
conn = DriverManager.getConnection(url, user, password);
} catch (SQLException sqlEx) {
sqlEx.printStackTrace();
}
return conn;
}
}

We will create a second class (not included in the system) named DBConnectorTest to test if DBConnector works.

import java.sql.Connection;
public class DBConnectorTest {
private static DBConnector dbConn = new DBConnector(“jdbc:mysql://localhost:3306/tms”,”root”,””);
public static void main(String args[]) throws Exception {
Connection conn = dbConn.connect();
if(conn != null) {
System.out.println(“Connection to database established!”);
}
}
}

The url is jdbc:mysql://localhost:3306/tms. It indicates the protocol (in this case, mysql), hostname (localhost or IP address), port (3306 for mysql), and the database name, which in this case is tms.

If this code doesn’t work, please make sure that you have installed Java support for MySQL correctly. If you are not sure about it, please refer to this tutorial. I was able to get things right when I found Java’s lib/ext directory. Where? It really depends on your system. But in my case, the path looks like this: C:\Program Files\Java\jdk1.6.0\jre\lib\ext.

Download the current version of MySQL Connector/J from mysql.com’s Drivers and Connectors. If you are a Windows user, then you’d want to choose the .zip file. Expand the file and move the driver(mysql-connector-java-X.X.X-bin.jar) to the lib/ext directory from the previous step.

The values of the instance variables user, password and url of  DBConnector would depend on your system. It is of course, always advisable to make your systems secure so please avoid using root and do create a strong password for your MySQL instance. Or else, you’re in BIG trouble! Just for simplicity, I used WAMP’s default values.

Doing Work that I â™Ľ

Wow. My first week with Active Rail Solutions was awesome. I had a great time re-learning PHP and applying the object-oriented approach. I never tried learning OO PHP before because I simply didn’t feel that I needed to. I was content with Java for OO coding and I was comfortable with the old PHP because my codes worked anyway. But when James showed me the dynamics of using OO PHP, I saw its potential for speeding up development work and I really appreciated it.

I really loooovee NetBeans too! Again, I only used NetBeans for Java before but now that it also caters PHP coding, I prefer it over Dreamweaver. It’s all because of its code-completion/intelligent coding feature. I sometimes miss the WYSIWUG feature of Dreamweaver for web development (forms, images, etc.) but I get a cleaner code without the automatically generated codes/scripts from Dreamweaver.

I also love HeidiSQL. It’s such a great tool for database management. It’s so easy to use and I think it has a very smart user interface. I used to create scripts for my database and type out all my queries on the MySQL console. Well, it would still work for me but I’d prefer to use tools such as HeidiSQL. Why waste valuable development time? ^^,

I can’t help but thank all the developers of these super wonderful Free and Open Source Software. You’ve made our lives sweeter…THANK YOU!!!

I’ve realized that I really liked doing this kind of job. I enjoy it so much that I could not even notice the hours passing by. I still get that giddy feeling when I am able to make the system do what I wanted it to do. That emotional, happy, fulfilling moment that just makes me want to shout for joy and smile triumphantly to myself. Wow, it reminds me why I took IT as my major in college. I’ve been seeking for this yahoo feeling for a very long time…a very long time…

and what makes growing in this field a lot better is the awesome team that I belong to. Extremely talented, generous, patient, helpful and – most importantly, humble human beings.

Teaching Servlets with NetBeans 6.x & TomCat 6.0

I was a little embarrassed with myself when I discovered what went wrong with my NetBeans-TomCat-servlet application. My gosh! How could I have not known that?! Gosh, after years of teaching Web development.. Hehe.. It’s really funny. But anyway, what matters is that I was able to realize my mistake. Handling too many subjects has left me with only an hour (mostly) to prepare for my subjects. I know it’s not something to be proud of. And I’m really disappointed with myself because I wasn’t able to foresee these problems when I accepted the subject load. Anyway, I just want to document this learning so I’ll avoid committing the same mistake in the future.

I already installed TomCat 6.0 on my machine but I didn’t start it from NetBeans. Instead, I opened my html file from where it was saved (somewhere in my local disk). Anybody who has had a background on Web development knows that you have to execute your html files from the server (ex. localhost) and not from where it is saved so that you could execute the scripts, or in this case, the servlet.

I was now confused why my html file could not “see” or locate my servlet. So I tried: removing and adding my TomCat server in NetBeans, and duplicating the servlet class in the different directories of TomCat. Nothing worked.

When I realized that I hadn’t started TomCat from NetBeans, I tried to start it but now NetBeans would tell me that it failed to start TomCat because port 8080 is already in use. Argh!!! I searched the net for some answers and I learned that the error was due to multiple instances of TomCat that are running. I tried looking at the connections on my machine using netstat, and indeed, port 8080 was used. Whew!

I restarted my machine hoping that the service using 8080 would terminate. But, still I got the same freakin error! I was fed up and just tried using another port (8089) and when I started TomCat (inside NetBeans)… it worked!!! When I tried running the project, the browser was automatically invoked and the servlet did its job. Yey!!! Haha.

After all the confusion, my servlets are now running perfectly well.. 🙂

Getting Started with PHP Project

At last, now I can get started with my PHP Project. Whew!

Thank goodness for Free and Open Source Softwares like HeidiSQL, which helped me build the SRMIS database on my machine from the database dump that Sir Jap gave me.

However, there was an error (which I thought was due to the large size of the dump) generated when I imported the sql file: Got packet bigger than max_allowed_packet bytes. Sir Japhet told me to edit the MySQL .ini file. When I googled how I could fix the problem, I found out that the error was due to the setting in MySQL that defines the maximum size of any data packet that can be written to a single field in the mysql database. Luckily, I found a link on how to increase the allowed packet size.  🙂