Returned Value versus Exception Handling

Most software developers now a day write code using object oriented (OO) programming languages. In some cases, due to performance reasons, some code may be written using a non OO language. One way or the other, the question may come up if return codes are better than using exceptions. I do not believe you can come with enough reasons to justify one method or the other which would be accepted by most software developers. What I will do is discuss some considerations and give my opinion. Please take it all with a grain of salt. Continue reading “Returned Value versus Exception Handling”

String Testing

The use of string tests might not be a common process when testing software; perhaps it should.

So what is String Test?

String Tests are used to test software features when already integrated in the final software and before it is sent to production. When features in the software are being developed, engineers write unit tests to make sure that the different functions and classes work the way they were intended. These tests are typically white box and have reduced scope. Continue reading “String Testing”

Coding Conventions – C Programming Language

Last week I spoke with several developers regarding coding conventions for the C programming language. Most of them responded that there is some documentation by the organization, but some of them have never found it or read it. Most of them just look at existing code and try to mimic. The issue is that on most legacy projects, there is code written using different styles. Some organizations use some tools to extract documentation and or code metrics. With time those tools may have changed leaving behind artifacts that are no longer needed. Continue reading “Coding Conventions – C Programming Language”

Technical Debt

I have been architecting, designing, documenting from an engineering point of view, implementing, and testing software products and services for a few decades. Many years ago, working for a Fortune 500, I was troubled by the practices used to develop software. It seems that there had to be better ways to get from requirements to products and services. That induced me to read books and papers and take several college courses in order to satisfy my curiosity and be able to apply and create better ways. Continue reading “Technical Debt”

Testing With Dependency Inversion

Earlier this week I was talking with a system architect. He mentioned what I consider a sensitive and interesting question. How do you use Dependency Inversion (DI) to test software? If you are interested in this question please stop reading and allow yourself a few minutes thinking about the question and associated answer. Continue reading “Testing With Dependency Inversion”

C++ or Java?

Last week I was talking with a manager on the subject of C++ versus Java. The motivation behind this was if a project needs to be developed in C++ does experience in Java could be useful to quickly learn the specifics of C++ and become proficient in a very short period of time.

I would like to share my thoughts regarding this question. Perhaps it will shed some light into similar discussions that may arise in current or future projects. I would like to state that in my software development career I have learned and used a few procedural and OO programming languages (Assembly Language (multiple processors), BASIC, Bash shell, C shell, C, C++, C#, Fortran, Java, JavaScript, Pascal, Perl, PHP, PL/1, PL/C, Python, Ruby on Rails, SQL, Visual Basic and Visual C++ among others). In some projects I have written several million LOC using a single programming language. Continue reading “C++ or Java?”

The Single-Responsibility Principle

Today is January 01, 2017. Happy and prosperous New Year!!!

As I have mentioned in prior blog entries, among many other activities, I enjoy reading technical books in order to learn, refresh and on occasions question what some may consider common knowledge. One of the books that I am currently reading is “Agile Software Development Principles, Patterns and Development” by Robert C. Martin. So far, I recommend this book to people studying and practicing computer science. Continue reading “The Single-Responsibility Principle”

Prime Numbers

The motivation for this entry is based on chapter 5 of the book Agile Software Development Principles, Patterns and Practices by Robert Martin. In that chapter the author writes an initial program with correct output. The issue is that it is not as simple to follow (and possibly maintain) as the final one. The final one is longer but much easier to follow.

I was not able to find the source code in the URL specified by the book: www.objectmentor.com/PPP (the domain is up for grabs). I wanted to determine if the performance would be different (better) for the short program when compared against the longer one, which also outputs the same results. Continue reading “Prime Numbers”

Test Driven Development

What is Test Driven Development? Is it useful? Should I and my team make use of it?

According to Wikipedia (I have edited the following paragraphs):

“Test-driven development (TDD) is a software development process that relies on the repetition of a very short development cycle: Requirements are turned into very specific test cases. The software is improved to pass new tests, only. This is opposed to software development that allows software to be added that is not proven to meet requirements. Continue reading “Test Driven Development”

Should One Start a Project Without Requirements?

A week or two ago, a couple engineers and I were discussing software engineering topics and the following question came up: “Would you start a software development project without requirements”? As you might expect, this is a loaded question that has no single correct answer.

What follows are my thoughts on how to put the question and answers in perspective. Continue reading “Should One Start a Project Without Requirements?”