Friday, September 12, 2008

Gift List Part 1 - OOP

Object Oriented Programming - What is it? We've all heard it bandied about in our tech circles. Some of us have even had the opportunity to use it. According to Wikipedia:

"Object-oriented programming (OOP) is a programming paradigm that uses "objects" and their interactions to design applications and computer programs. Programming techniques may include features such as encapsulation, modularity, polymorphism, and inheritance. It was not commonly used in mainstream software application development until the early 1990s. Many modern programming languages now support OOP."

Okay, so what does that mean to someone just starting out? It means you find the most generic "thingy" that will be used in your application and build on that, ie if you're writing a banking system, the two most basic items are accounts and customers. You may have checking, savings, certificates of deposits, etc for the types of accounts while the customers may be businesses or personal, senior or student, and so on.

For the sample application I'm going to be writing, I'm using a gift list used by my wife and I to keep track of all the gifts we give and receive. The two basic items will be gifts and people. The gifts will have various properties and there may be additional types that extend the basic structure, same for the people. If they're not family, we probably don't care about anniversaries.

So much for OOP. Next will be TDD, followed by the first class.

Cheers,
Chris

Thursday, September 11, 2008

New series

I'm going to write a short primer on OOP using TDD. You may ask why would we ever need another series on object oriented programming using test driven development? We probably don't but it's like a math textbook. There are multiple variation of Calculus textbooks, not including the regular revisions made to a particular book, so a professor can find the one that best suits his style. I found it helpful to look at other texts with other examples to see how you approach a problem and the best method for solving it.

In these series, I'm going to steer clear of the standard auto/sports/banking/address examples and create something I find useful for myself and maybe others will too. I'm going to create a gift log system. If your family is anything like mine, there are multiple sets of parents/grandparents/uncles & aunts and cousins, not to mention siblings, that you give and receive presents from/to. We have a small spreadsheet that we keep tally on so we know who and what we gave and received so we don't accidentally give the same gift or appear to be regifting.

The other thing that should differentiate this attempt from others will be the fact that I'm going to provide samples in C#, VB.NET and Java. There have been many times I've searched for a solution for a client only to find it written in a language they don't/won't use and I don't have a good way to translate the example I find so here I'm going to cover the major languages in use right now. If there's a new one that rises to the top, I'll rework it in the samples.

Cheers,
Chris

Wednesday, September 10, 2008

Thoughts 2.0

It's been a long sabbatical I've been on since my last post. I've travelled the world for business and pleasure. I've looked at possibly changing jobs but ultimately deciding to stay where I am. The tech world has had a couple of major shake ups: the new iPhone, Google's Chrome, Microsoft trying for Yahoo, the new Microsoft servers, the explosion of the netbook, and on and on.

I'm fully behind all the advances we are seeing, but there appears to be a lack of direction for most of the new devices and technology. Look at Microsoft's DotNet stack. What started as a small, concise collection of libraries that eased the development process has now become a large, nasty web of expansive libraries that now require a specialization to fully utilize.

The netbook is another prime example. It was a nice little device that worked beautifully for what it was designed to do. Now, all the manufacturers are developing larger, more powerful machines that will shortly rival the complexity of a budget laptop at a premium price.

This is the boon and bane of capitalism. Manufacturers will build what the consumer asks for and the consumer always wants more. Just because we can build it and they will come, doesn't mean it's good for them to be there so maybe we shouldn't build it.

Chris