Polyglot Programming

no single language

In this day and age, knowing one programming language is not enough to develop software.

Take for example web development. You need to know at least 3 different languages to write a web application:

  1. HTML to provide a user interface.
  2. A web scripting language (e.g. PHP) and possibly a general programming language (e.g. JSP + Java, ASP.NET + C#) in order to process the data entered by the user.
  3. SQL so that you could save the data to a database.

Of course, these are just the bare bones of a web application. More practical web apps require the developer to know more technologies:

  1. CSS to make the interface more appealing and manageable.
  2. Javascript to make that interface more dynamic (a must in Web 2.0).
  3. Another markup language like XML and JSON to facilitate data exchange (e.g. for AJAX)
  4. A web framework to reduce the complexity of a large system.
  5. A scripting language to automate the build and testing of the system

Developing for corporate clients require even more technologies:

  1. Ways of interacting with services on other servers which, when listed down, looks like alphabet soup: SOAP, RPC, CORBA, SOA, etc.
  2. Various security protocols, with keys, certificates, and whatnot.

Continue reading “Polyglot Programming”

Object Oriented Programming Basics

sample OO class diagram

As you may already have read in my previous posts, one of my biggest pet peeves in the IT industry today is that a lot of people are using Object Oriented Programming (OOP) without even understanding the basic concepts behind it. They’re not using OOP for its benefits over the previous generation’s simple structured procedural programming; they’re using it simply because the language they’re coding in is OOP (e.g. Java, .NET).

To put it bluntly, it’s like writing spaghetti code in a structured programming language.

With this being my perspective about the local status quo, I feel that I have to post about the basics of OOP before moving on to the other fun stuff related to programming.

Continue reading “Object Oriented Programming Basics”

Developer Nomenclature

I might as well get this one out before I write other software engineering posts.

You might have noticed that I rarely use computer programmer when talking about people crafting software. This is simply because crafting quality software requires a lot more than knowing how to code programs.

Recall the waterfall model:

Waterfall Model

As mentioned in my post, it’s flawed, but only for its flow. The steps, from System Requirements up to Operations, are still applicable in the creation of all client-based software systems.

As you can see, Coding (or in technical terms, Construction), while still a very important part of software development, is just one of the seven steps in development. Of course it doesn’t take only 1/7th of the total project effort, but in practice it only takes 50-20% of the total effort: the larger and the less agile the project, the less effort is spent on construction.

That said, in the context of software development, the term programmer is sometimes used as a pejorative, implying that the person’s only job is to code programs based on designs handed down to him by Analysts or Software Architects. In other words, he’s just a grunt.

I personally don’t consider the term to be a pejorative, especially since I personally don’t mind getting my hands dirty with grunt work. So yes, I’m proud to be a computer programmer. However, I won’t use that term in my posts because, as I said above, it’s too narrow.

In place of “computer programmer”, you would see me use the terms software developer and software engineer interchangeably.

Both terms solve the problem posed by “computer programmer”, namely, that both titles span the entire software development life cycle. Software developers are not limited to computer programming. They can also be analysts that gather and process the user’s requirements, or architects that design from a much higher standpoint than analysts. They can also be in specialized roles other than programming like QA Testers and DBAs. They can even be Project Managers, a role that don’t have any direct relationship to the crafted system itself.

The only practical difference between the two terms is that some people shy away from software engineer because as it stands software engineering is still mostly a misunderstood buzzword rather than a serious profession. You have guys saying “I’m a software engineer!” but fail to grasp the basic concepts of software engineering from project management (e.g. Brook’s Law, Peter Principle) down to construction (e.g. basic OOP concepts).

But then again I’m unfazed by that concern. I’m still hoping that the day will come that our profession would be a lot more respectable than it is now, so for that dream, I’ll be using the two terms interchangeably.

Feynman Lectures at Project Tuva

Richard Feynman

As you may have guessed from some of my posts a couple of months ago, physicist Dr. Richard Feynman is one of my favorite scientists. While it is true that I only came to know about him after graduating from college, his work in promoting proper scientific and engineering procedures, as shown by his cargo cult speech and his demonstration of the O-ring failure in the Challenger disaster, has inspired me to… well… put back the “science” back in “computer science” and “engineering” back in “software engineering”.

Beyond his contributions to physics and his storied biography, Dr. Feynman is also known for his teaching ability. During his years as a professor, he was able to explain clearly the complex concepts of physics to college students—an impressive feat during his time.

With the wonders of modern technology (and the size of Bill Gate’s wallet), the public can now watch some of Dr. Feynman’s lectures. According to Microsoft’s press release:

REDMOND, Wash. — July 14, 2009 — Microsoft Research, in collaboration with Microsoft Corp. Chairman Bill Gates, today launched a Web site that makes an acclaimed lecture series by the iconic physicist Richard Feynman freely available to the general public for the first time. The lectures, which Feynman originally delivered at Cornell University in 1964, have been hugely influential for many people, including Gates. Gates privately purchased the rights to the seven lectures in the series, called “The Character of Physical Law,” to make them widely available to the public for free with the hope that they will help get kids excited about physics and science.

The historic lectures and related content can be seen at http://research.microsoft.com/tuva. The name “Tuva” was chosen because of Feynman’s lifelong fascination with the small Russian republic of Tuva, located in the heart of Asia.

Feynman was one of the most popular scientists of the 20th century, equally regarded for his scientific insights as well as his ability to convey his enthusiasm for science through his lectures and writings. He shared the Nobel Prize in Physics in 1965 and was also known for his quirky sense of humor and eccentric and wide-ranging interests.

I’ve only seen the first two videos and I can say that they are fun to watch. Dr. Feynman may have his awkward moments (he made a discussion flow mistake in the first video) but overall we can see how well he engages his audience as discusses the lesson. One thing to note in the video is how lectures were presented back then, namely, how Dr. Feynman relies on slides only as visual aids and not as some summary tool. (For the record, I hate it when people use PowerPoint slides with more than one line of text for teaching.)

You might be worried about the “freshness” of his lectures, especially considering that these lectures were made in 1964. Fortunately, unlike some other fields of science, the understanding of the fundamental laws of physics haven’t changed much in the past 45 years. A college student will find these lectures as informative as they were back then.