Sunday, August 30, 2009

Understanding inheritance




I have always not really liked the idea of using inheritance. The reason why is because there is so much abstraction going on. Let me use a general example outside of programming. Just say you have a door, and it can do many things, it can open, close, lock, and unlock. Instead of going out to the forest and cutting down a tree and building the door, I could go to a manufacturer or hardware store and buy a door. Then I can modify it to do one extra thing, display the street numbers.


Now going back to programming, we could use somebody else's code that already made a class called Door. When we inherit the door, we don't have to make the open() close() lock() and unlock() methods, because somebody already did it for us. All we need to do is add a few lines like this:

public partial class myInheritedDoor : Door

{

// add your methods here

}


It took a little time for me to understand inheritance, but I did discover it is useful because it helps you save time. I would also suggest going to google.com or yahoo.com and type in "c sharp inheritance examples". Better yet to make your life easier, type in "c sharp basic inheritance examples"

Saturday, August 29, 2009

Iterative Teaching

There are all kinds of code that is readily available over the internet. All you have to do is search for it. But a common problem that I have (especially while trying to learn Java), is that a lot of code is pretty much snippets. I don't know about anyone else, but I cannot use snippets of code, and it is hard to understand unless I can see the whole code. After all, a lot of us are beginners, when it comes to learning new programs, and we don't know how to import packages, and libraries, especially if we can't see the whole code.

But there is help. I would suggest doing a search for classes that are offered in learning the syntax of a language, or some programming course for beginners. Even If I know how to do something, I'm sure the instructor will get to a part that I have had difficulty with before.

Also, If you teach from the beginning, that means that nobody is left behind. So just like there is iterative programming, there should be iterative teaching.

Monday, August 24, 2009

Compatability

I always wonder how difficult it would be to integrate older code into newer devices. People call this ability as "backward compatability" so they can integrate what's called legacy devices. For instance, a legacy device would be a car phone. We know that the car phone no longer exists, and has been replaced with cell phones. However, cell phones have had some code that have made it's way into some of the newer code. For instance, when you turn on a cell phone, there is code to make the back screen light up. This code was originally in the carphone!

Mobile Apps and Older Versions

I was working on trying to develop a simple application, and had a question: What if someone used a previous version of some software, such as Visual Studio 2000, or Borland Compiler (which is not a popular IDE for C languages anymore). If this happened, I wonder what compatability issues could surface.

There are so many different versions of linux (debian, linux kernel, fedora, ubuntu, centOs, etc) and other operating systems. I know that all of them have their share of issues, no matter if they are open source or not. The problem is, how do we catalog these errors and find ways to fix the problems?

Saturday, August 22, 2009

Visual Studio vs. Eclipse

There are so many programs to use when programming. You can use Microsoft Visual Studio (I'm currently using Microsoft Visual Studio 2005, and am now upgrading to Microsoft Visual Studio 2008...) But I don't want to! I hate changes! I know that when you are in this business, we have to keep track of the new developments, because after all, we are software engineers. We are the people whow are making new database programs, and new games, etc. And we definitely don't want to be behind the curve.

I am learning Eclipse, mainly because I have to learn how to develop using Java. Microsoft Visual J++ is not very popular, and it was Microsoft's answer to Java. The problem that I have is that since Eclipse is open source, there are so many different people who write different packages, etc. to the IDE, and a lot of them are non-standard. So it's very difficult to find support online.

I'll keep you posted on what I've learned in Eclipse, but I've got to say, I love Visual Studio. I would even use Notepad ++ to do java editing. The only problem is that Notepad ++ cannot help you do GUI, and it does not check your code for syntax errors. Ugh, I need to shape up, stop complaining, and learn Eclipse.

Tuesday, August 18, 2009

How to Subscribe to my Posts

The easiest way to subscribe to my posts are to go to google.com and choose the 'reader' option that is at the top of your page. You have to have a gmail account, and once you sign up for the account, it should be shown. You can also use other readers, and all you have to do is copy and paste this url into the reader: http://josephamospowell.blogspot.com/feeds/posts/default?alt=rss

If you have any questions, add a comment on this page. You can also find all sorts of help on the google homepage. Just go to google.com and type in 'Google Reader'

First Mobile Application

Ok, I am trying to develop the first mobile application. The only problem is that I have the Visual Studio 2005, and It has the options of Smartphone 2003, Pocket PC 2003, and Windows CE 5.0, but I didn't see the 'Smartdevice' option that is listed using the new version of Microsoft Visual Studio 2008.

I also have had to get used to the fact that some of the options are harder to work with, and that we are working with a very limited screen space... So that meana there is no trying to develop complete applications, and I have to keep track of if someone is using a thumb or a stylus (i've always hated that word, it sounds like glasses or some fancy word.. just say pointed pen!).

Oh well, we'll see how this development goes over time.