Archive for the 'Programming' Category

Why NOT to make programming into a religion

Saturday, October 24th, 2009

I find it amusing, as a programmer of computer code, are these arguments I read about how language A sucks when language B is far better. Assume I mean language A to be something like Java and B to mean something like C++ or strait ansi C.

I hear all the time about why C++ sucks, when compared to C. Or how Java sucks so bad because it is slow and doesn’y really teach you about a how to program.

I concider myself to be an athiest programmer. Meaning, I don’t worship one language over another. This is not entirely true. I think PHP is far better than Perl. Maybe, I’m just not left brained enough to want to put up with all of Perl’s, let’s try to be as tricky as we can with ONE line of code, instead of making it even close to human readable.

The comment I made above, is probably the most reasonable argument to make, if you want to start a rant about why languages suck compared to others. In that, PHP and Perl are trying to operate on mostly level ground. Both are interpreted languages and both abstract coding ideas away, to make life easier for the programmer. Such as, not having to worry about data typing and memory allocation.

To compare Perl to PHP, is not nessasarily a technical argument, more so than a timing one. If I started to learn Perl before PHP, because PHP did not exist, than I would have been raised on Perl. Instead, I was blessed, to not have to deal with Perl and use a cleaner language, PHP, which operates more or less on the same level.

But, when the argument comparing C to Java comes up. Or even C to C++, I see their point of views. But, I also see how they unintentionally corner themselves into a ‘Language Religion’, so to speak. Meaning, since I ONLY like to program in ASM or as close to the hardware as possible, hence rooting for C or ASM, and completely dogging more abstracted languages like C++ or Java.

There is no question that C is exactly what you need, if you want to program device drivers or make programs that are as efficient as humanly possible, in terms of memory and CPU cycles, while still being as portable as possible. ASM *Assembly is NOT portable therefore belongs in a category of it’s own.

But, what about when you want to program in C++? Just about every hardcore C programmer will tell you that C++ is a big fat pig. It’s usages of Classes and Templates as well as trying to make pointers ‘easier to use and understand’, completely fails.

The argument than becomes a heated debate, when you compare C to C++. Everything you can do in C++ you can do in C, and visa versa! C++ just abstracts things away, to the point, that when you compile and look at C++ code, and compare it to C code, the resulting Assembly code is much less bloated with duplicate instructions, or instructions that can be optimize, had the programmer use strait C instead. This is absolutely true when one wants to reverse engineer compiled code, or try to debug it. C ASM compiled from C is going to be cleaner than ASM compiled from C++.

However, if you want to program a video game, in some cases C++ is more manageable than C, because using the templates and Classes, built into C++ keeps you from having to reinvent those parts. You can make C do everything C++ can using structs with function points and generic function parameters using VOID *. However, why? When you can use these powerful abstractions in C++ and avoiding potential bugs as a result of having to manage every minute detail?

Granted, your resulting C++ will be a bit more bloated in terms of extra ASM instructions, but with Dual CPU Cores and Gigabytes of RAM to make up for this overhead, why bother?

At the same time, you can say C now has many good libraries now, that you CAN program a game in C using graphics libraries like GTK. However, for your own data structures, for instance, if you need to manage the data items that make up a space ship in a 2d/3d shooter game, you will be left with structs in C, while C++ having the advantage of Class creation with easy to add methods, constructors and destructors.

Maybe you want to invent the Class concept all over again using C or maybe you don’t, therefore have the option to take advantage of all that CPu, GPU and RAM and just accept the extra overhead that comes with C++.

While at the same time, strait C is absolutely perfect for such things are Kernel development and device drivers, because in those cases you do NOT want any extra overhead, to make your program run as fast and portable as possible.

Do not lock yourself into a corner, by discounting one language for another. Especially when it comes to the debate of C verse C++. Both have their advantages and disadvantages.

The same can be said of Java in comparison to Python.

Where I personally draw the distinction between languages are languages that try to compete at the same abstraction level. Again, an ease no brainer for me is that PHP rocks compared to Perl. Both are at the same abstraction point, yet one lacks needless complexity, for complexities sake. In other words, how much of a nerd to I really want to be? And, what language was I raised on, at the time. Again for me, PHP was available, so Perl was out the door.

However, even at that point in the argument, it is unfair to discount one for the other, if only for the desire to be free to choice your level of nerdness. Want to be needlessly nerdy AND have the option to choose between PHP and/or Perl (simply because both exist and are highly developed), you have the choice.

Now why do I care to even bring up the argument of why people bring up computer language comparison debates? Because, if you see the language for what it is good at and not good at, will open the doors for being able to pick the right language for the job and amount of time and will and perhaps money that is involved.

Can a Programmer ever Officially, Retire?

Friday, October 17th, 2008

An interesting blogger and programmer, Jeff Atwood, which publishes one of the most popular Tech related Blogs on the internet, Coding Horror, brought up an interesting point.

By the way, I think Jeff Atwood, and the success of his blog, is a direct result of a guy that knows how to reach his readers, using interesting choice of words, but with an added touch of his personality, that makes you feel like you can trust the guy, even before actually meeting him.

Another famous programmer, blogger, business owner and book author, Joel Spolsky, actually holds the title of, Most Read Programmer Blog. Second, would be, that of Coding Horror.

Finally, the two collaborated and created, Stack Over Flow, which is an interesting, “Questions and Answers” site, making use of Ajax, giving the site a real time feel to it. The site really is unique, and I recommend any programmer, coming from any platform, to check their Web Sites out.

Anyways, the point Jeff brought up, which I often ponder myself, was what are programmers expected to do, when they get old? Just continue to pound away at code, until dieing flat out, face first on to his/her keyboard? There doesn’t seem to be a retirement plan for programmers.

Programmers tend to work on a contractual basis, mostly at start ups as they are born and die out, or the Programmer just losing interest in their job, to then move on to another. You can’t expect to build a ‘nest egg’, if one is moving from job to job.

Take for instance, Ken Thompson, one of the fathers of Unix. (The other father, is of a man, by the name of Dennis Ritchie.) Ken, currently works at Google, as a distinguished employee. And when the name, Ken Thompson, was mentioned in a Stack Over Flow podcast, by someone from Google, that also happens to be a well known tech blogger, no one paused to mention Ken Thompson, at all. I think mostly, because Jeff nor Joel are Linux programmers, they are both, Microsoft .NET programmers.

But, still. It goes to show, that even if you invent the mother of all Operating Systems, you are destined to, just be another employee at a job. Sure, Google offers retirement packages, for those that stick around long enough. But, in the field of Technology, the turn around rate is high. It is hard for companies to keep their talent, and make them stay in one spot, for more than a couple of years.

Maybe I am just over thinking this. Go figure, as all programmers do, but there is something to be said about the human life span and what we can or can not expect our (the programmers) retirement will be like.

Are we destined to “pound away at the key board” until the day we have a heart attack, and do a face plant into our key boards?

Open Source Programmer goes to court and Wins

Friday, October 3rd, 2008

Imagine, your a programmer, and you release your very own code, under an Open Source License. Meaning, others are allowed to use, modify, share and contribute, to make it better. However, one can not use the same code and then market it, only to bill the original programmer(s), because of a sneaky patent being filed.

Well, this actually happened, which sounds absurd, but is true.

The software is used to control model trains. A hobbyists past time project, of which, there are many. However, another individual, that sells model trains, decides to file and gain a patent, regarding the model train controller ‘Free Software’, then attempts to bill the creator/programmer of the model train controller computer code! Wow!

The details can be read here.

Naturally, the programmer takes the person, trying to bill him, to court and wins!

This marks a major victory, regarding the protection of Open Source Developers/Programmers. Such a case had never been officially fought in a court system, only idle threats of it possibly happening. Case in point … For years, Microsoft has accused Linux, and the entire Open Source community, at large, that it too violates Microsoft Patents, of which MS refuses to fully disclose.

This small victory, can now be the foundation in resolving the FUD — Fear Uncertainty and Doubt — that large corporates are using, to deter would be businesses, from going the Open Source route, rather than the said corporation’s route. ‘OK, flat out… I am talking about Microsoft, being that corporation.’

It just keeps getting better, for the Open Source Innovators. It is a huge controversy to patent any kind of software process, because it’s a bit like trying to patent the English Alphabet, than attempting to ask for licensing fees for those that write books. Programming, has too many universally required algorithms and processes, that many computer program share. Attempting to patent a specific software idea simply is not rationale.

So, it will be interesting to see where all this takes Open Source, and hopefully will encourage other businesses that there are alternative software technologies out there, that are patent free.

Dojo, a Web 2.0 Browser Desktop Toolkit

Tuesday, September 30th, 2008

Web 2.0 Browser Desktop Toolkit…

Wow, now that is a mouthful.

First off, Web 2.0 is such a clique term, but really it can signify a greater movement of businesses that completely operate on the Internet, through a Web Browser. There are so many examples of this, I could fill a whole page. Here are a few, to jog your memory; Google, Facebook, MySpace and Flickr.

Next, did I say, a Browser Desktop? Or, did I mean to say, Desktop Browser? No, you heard me right. A Browser Desktop. Yes, a Desktop, sort of, that runs inside your browser. To call this a Desktop is a little over kill, but a great way to get readers attention. What it really boils down to is a Platform within a Web Browser.

Dojo

Finally, Toolkit. Now, there are loads and I mean loads of JavaScript Libraries, collections, Toolkits, whatever you want to call them. But, Dojo truly is a Toolkit. It is more than a simple drop in JS script that simplifies typing long strings like document.getElementById and the like, sure it does that and then some. Dojo, also includes built in Dojo Widgets gleefully called dijits. Stuff like charts, Windows that mimic Desktop Applications, Sliders, Tree Folders, Layout Containers, Dialog Boxes, Buttons and more. You name a common GUI application widget, Dojo has em built in.

Dojo, takes it a step further, by giving you a complete framework, for creating your own custom widgets, which you can easily modify beginning from the Built in ones, or start one from scratch. And, to add these dijits (Dojo widgets) to your web page, you simply type a dojoType=”your.dijit.here” attribute, to say a div tag, and Dojo will magically, via it’s powerful parser engine, turn that div tag, into a Rich Text Editor or maybe just a simple dialog box.

There are arguments over at WaSP, about Dojo seemingly, making up their own HTML attributes, like dojoType. You are free to read the interesting arguments, on the WaSP site, which Alex Russell, tactfully handles well to their Web Standards Concerns. Note: The page is actually focusing on the IBM sponsorship of Dojo, but in the comments area, you can read the leaders of WaSP and Alex, respectfully, duke it out about HTML semantics.

Now, you might be thinking, that this is great and all, but the size of the .js files, and time it must takes to render and process all this JavaScript, must make the experience slow and rendered useless. But, this is not the case. Remember, this is a JavaScript Toolkit. For included in Dojo, are facilities to create custom builds of your Dojo creation. This includes; compressing, excluding everything, but what your Dojo Web Application needs and bundling it all up for the Web Browsers consumption. The build system, is based on Rhino, and contains an army of option tweaks and preferences, in how you want to build your Dojo Application. It is almost as if we are building or compiling a C and C++ application. But, JavaScript is still an interpretable language. Dojo’s build system simply tries to package it all up and make it as small and easy to download and deploy as possible.

Finally, Dojo Toolkit, contains a complete test harness, allowing you to stress test your product.

Dojo is a JavaScript Toolkit, in every sense of the word, ‘Toolkit’.

Now, the Dojo Project is a bit spoiled. It is backed by a Commercial company, Sitepen, a not for profit foundation. What more could an Open Source Project ask for? Not, to mention, one of the founders of Dojo, Alex Russell, a very well spoken dude. You can Google his name, and find loads of Pod and Screen Casts of him ranting on, presenting Dojo.

One of the ‘cooler’ things, I just found, is the Site Pen sponsored, Adobe AIR application, that includes the Dojo API, Resource Collection of Links and a point and click Dojo Build Suite. If you are on Linux, you need to install Adobe AIR, than go get this must have, Dojo Toolbox.

Howto Setup Eclipse (PHP, JS, CSS, HTML) + SSH

Tuesday, September 23rd, 2008

Eclipse has become the most complex IDE ever created. It is programmed in the Java Language, which makes it able to run on Windows, Linux and Mac.

Best of all, it is Open Source, which means it is Free of Charge to own and use! Just download it, install some plug ins, and off you go.

Today, in this article, I will show you how to install Eclipse, and a fully capable Web 2.0 IDE with remote editing through SSH. I will be using the Aptana plug ins, which currently support HTML, JavaScript, CSS, PHP and Ajax Toolkits. Complete with code completion, code folding and of course syntax highlighting.

It used to be Zend’s PHP Studio IDE, that was top dawg. But, Eclipse and the arrival of Aptana, has changed all that.

Eclipse_Aptana

From the snapshot above you will see my (poorly) drawn arrows pointing to the Code outline and the 4 languages, PHP, JavaScript, HTML and CSS all coexisting in a single editor page. Aptana Editor is smart enough to know when you are typing either of the four languages and supply code assist and completion! I do not known of another IDE that does all four in at once. Best of all, the code assist is FAST, so there is virtually no delay in it figuring out what to code assist you with.

Code folding is great too. You can auto fold functions or just classes on page load or not. All of this is in the editors preferences. Eclipse + Aptana + RSE truly is something to applaud.

Downloading the Correct Eclipse Package

You have a few choices in how you want to download and use Aptana.

  • Aptana - Standalone Studio
  • Aptana - Eclipse Community Plug in
  • Aptana - Eclipse Commercial Plug in

Personally, I always go for the community edition, as this is Free and Open Source, right? However, Aptana’s commercial (Pay or Pro) Edition does have some addition features that the community edit does not. But, not many. Such as the sftp support, which we can get SSH by using the Free Open Source Eclipse RSE plug in. But, there are a few Aptana Commercial options, enough to give you some reason, to pay up for an enhanced edition. Also, you will be supporting the project, which so far, is giving Zend Studio a run for their money!

Also note, that the Aptana Standalone Studio version is just a rebuild of the Eclipse version. They just made the Tabs boxy instead of smooth and rounded, along with some other things. I do not know much more than that as I always use the Community Edition.

Here is a list of the differences from the Commercial (Pro) and Community Editions.

You will need the Classic or SDK version of Eclipse. Currently, at version 3.4 and called Ganymede.

Follow the instructions from Aptana’s Web Site, as they outline everything, complete with graphics. I suggest downloading the Eclipse using wget from the command line, if you on Linux or the Mac, with the resume option. wget is very aggressive, and will try on connection hick-ups and auto resume partial downloads.

wget -c http://eclipse.mirror…

Note: The Eclipse download link on Aptana’s site is for the Macintosh. If you are on Windows or Linux you will need to get your platforms compressed Eclipse package. Just a heads up, as Aptana does not bother to mention that!

After you have followed all the steps on Aptana’s instruction list, you will have Eclipse SDK installed along with the Aptana Perspective plug in.

Goto the Aptana Perspective and you will see a start page. Aptana has nicely outlined everything they offer for a developer to download, right from this Start Page.

You want to click on the PHP download, now. Check the box for installing Aptana PHP and click next, while in Eclipse. Choose Install All and restart Eclipse.

Now, you have the most powerful Web 2.0 (PHP, JavaScript, CSS and HTML) IDE, arguable, in existence!

Remote File editing using SSH in Eclipse

The great thing about setting up remote editing is that you can develop directly on your Production machine, while at the same time saving a local copy of all your files to your local machine. No need to fiddle around with FTP or uploading files, you edit them directly.

Although it is not recommend by most people, and if you in a corporate development environment, they may not allow this. But, I personally, code, operate and own all my sites and projects, so I make all the rules. I like to apply my file edits to the live site. This note only eliminates downtime, but I get to see my changes right away. It also forces you to code cautiously.

To set up SSH remote editing, in Eclipse you need the RSE plug in. RSE stands for Remote System Explorer. You can set up RSE to use FTP, SSH or whatever protocol you want. Since, developer should be using SSH to move files across the network, that is what we will set up.

Installing the Eclipse RSE plug in from Updater

Install RSE using Eclipse Software Update Manager, by going to help, software updates, available software(tab), Add site(button) and enter: http://download.eclipse.org/dsdp/tm/updates/ and Hit OK.

Choose RSE core and the SSH options. You can choose to install it all, if you like. We will be focusing on creating an SSH connection, only, as it will be a secure one, so on one can eaves drop on our code, while loading it to our remote site.

After accepting the Licensing Agreement and restarting Eclipse, we now have the RSE perspective available to us.

Creating an SSH connection account for Remote Editing and Browsing

Choose Remote System Explorer from the Perspectives list. On the left side of Eclipse you will see section called, Remote Systems.

Right click within this section and Create a New Connection. Choose Linux. Enter in the Host or IP address of the remote site along with a label for the connection. You can click Finish to complete the action or use the Next button to view details about how it is setting up the SSH Protocol connection.

Either way, after finishing you will see your new connection in the Remote Systems tab!

From here you click on the arrows under Sftp and follow the directory paths you want to explorer and locating files you want to load into Eclipse. At the point it needs authentication, enter in your SSH username and password, as if you were logging in under an SSH account.

Once you locate a file you can right click it and choose Open with Aptana PHP. The great thing about our Aptana setup is that for the first time, all HTML, JavaScript, CSS, and PHP are all highlighted and code completion enabled for all four languages, all in a single file!

Aptana is smart enough to know when you are in PHP code verse HTML or the others! It truly is powerful code editing.

Entering the World of Linux (Open Source)

Thursday, September 11th, 2008

This article will be all about how you can begin your journey into the Linux World of Software that powers Servers and Desktops and newer ideas like NetBooks.

After all Linux does power MySpace, Google, Yahoo!, Bloggers, Flickr, Twitter, YouTube, FaceBook and countless other ultra popular Web Sites.

Why did they all decide to use Linux and not a Microsoft Windows Server? If Microsoft Windows is so easy to use and set up, as they claim, why not?

Did you know that the NYSE — New York Stock Exchange — is running Linux Software? You can see now that any claims that Linux software is not to be used for serious things is completely said only to deter the uninformed, by instead, tricking them into buying expensive and in many cases, restrictive and inflexible Microsoft ‘Business’ Software.

After using computers, both on the Microsoft and Linux side, for over 10 years, I have come to a simple analogy of the Microsoft vs Linux mentality.

Microsoft is like that damn vacuum sales person that knocks on your door and tries to sell you a $2000 dollar vacuum. Claiming the vacuum is so great that you simply have to have it. Yet, you can go down to your local Wal-Mart or similar outlet store and buy a similar machine ‘the sucks on carpet’, for only $100-$200 dollars.

Linux, on the other hand, has not one sales person, not one single advert on any medium — that I have seen — yet is Microsoft’s number one competitor. The reason? Word of mouth and the Internet. People will use what works and fits the bill. They than tell all their friends about it. Linux is advertised in this manner, if you like. But, the difference is, getting advice from your colleeges, friends or family about what technology you should use, goes much further with people, than any door to door sales idiot or silly advert on TV.

I started in the Windows World.

I was there for the Windows 2000 release party for the new millennium, because I worked at Microsoft at that time. I was raised on programming using Visual Studio. I worked on Vista’s firewall as a paid beta tester and test code developer. Microsoft has done a decent job, seeing how it is a single company able to pull off all these enormously technical and complicated feats.

Even the anti-Microsoft Open Source advocates, have to give Microsoft credit for that. The idea, that one corporation could do all this, is mind blowing in itself. This is because of one man’s drive and vision, that only he understood, Bill Gates.

Bill Gates is a Business Genius. He is not a coding Genius. He is a master at putting pieces of very large and complicated puzzles together. He is genius at finding where he needs to be in order to make business deals at the right place and time and with whom. But, he is getting old and tired and burnt out.

He retired himself from Microsoft in 2008. Microsoft is only going to go down hill from there on out. And that is OK! Microsoft, at this point, has more lawsuits and monkeys on it’s back, than any company in history, and for good reason. I personally, think Mr. Gates would have stick it out longer, had it not been for the disappointment of Vista and the never ending appointments, not to his office in Redmond, but to the court rooms across the country!

Microsoft has reached a saturation point. It has completed it’s initial mission, set by Bill Gates, “To put a Computer on every Desktop in every household in America and on Earth.”.

Microsoft, did this! They won, long ago. Perhaps, with Windows 95 and 98.

Unfortunately, Microsoft is losing to Linux, because in the process of becoming so huge, employing over 70,000 people in many countries is beginning to bend under it’s own weight. They put so many of their chips in Windows and their Office Products. The problem is that you can only add so many features and glossiness to any computer program, until you have to realistically say, ‘Project is Complete’.

What Microsoft is trying to do, is continuously release sub prime features for Microsoft Windows and Office Suite Software, to make people want to upgrade. People are no longer buying into senseless ‘upgrades’. These upgrades are becoming so bad, that they are more about added complexity and add to the already bloated software.

People are not stupid. People know when they are being fooled. Yet, People still haven’t excepted the reality that there are alternatives out there. In time they will find those alternatives. This is when Microsoft really starts to get scary. Continue reading to see what Microsoft has already resorted to doing in 2007.

Click here to SKIP and HIDE the nasty, dirty, however sad but true part.

Extortion, because of Greed lead by Fear

This is now leading Microsoft, a huge corporation, consisting of enormous campuses, hundreds of buildings and tens of thousands of employees, fear that one day they will not be able to sustain it anymore. Greed is something we all know Microsoft has.

But, now for the first time in it’s history, it is fearful of it’s future sustainability. Microsoft Executives are a smart group of people, as well as most people that work there. They analyze and plan for the future. They know they have to sell X amount of Windows and X amount of Office or they start to sink.

This has lead to real fear, inside the company.

Fear and Greed mixed together, is a truly an unreal state of mind to be in. It can drive people to criminal and corrupt actions. Want to save the Microsoft Monopoly? Yet, still drink free milk and coke for all employees with free parking? Enjoying great stock options and benefits? These are greedy things. Not all companies of that size can supply such luxuries. Now mix in the fear that Microsoft can not be king of the hill anymore?

Microsoft, is committing everything from extortion to lying in court.

Extortion is a strong word, I know. It is often associated with, The Mob.

But, Microsoft is extorting many Linux Companies. Let me give you an example.

The SUSE (Novell) vs Microsoft lawsuit. Microsoft claims that Novell — SUSE Linux Distribution — is violating Microsoft Software Patents. They threatened to sue SUSE and SUSE customers, if they did not agree to buy Microsoft Certificates. These Certificates give SUSE and their customers immunity from any Microsoft attack, in the form of a law suite.

Below is the definition of the word ‘Extortion’.

EXTORTION - The use, or the express or implicit threat of the use, of violence or other criminal means to cause harm to person, reputation, or property as a means to obtain property from someone else with his consent. USC 18

The Hobbs Act defines “extortion” as “the obtaining of property from another, with his consent, induced by wrongful use of actual or threatened force, violence, or fear, or under color of official right.” 18 U.S.C. S 1951(b)(2).

SUSE Linux must buy protection from Microsoft or Microsoft threatens to sue. That is extortion. Microsoft has not released which patents SUSE violates. SUSE doesn’t even know which patents Microsoft is threatening with. Even though Microsoft has been asked many times to supply proof and which patents, they refused.

You have to ask why SUSE would sign such a deal, when they did not know if any patents where being violated. Well, folks, the reason is because SUSE is a small company, the reformation of Novell trying to rebuild it’s dead company. They don’t have the money for a long drawn out court battle with a Multi-Billion Dollar corporation, like Microsoft. So, the best bet was to just pay for Microsoft Cetificates and move on. However, the point still stands. Extortion is the point.

The software patent threats are useless, because there are dozens of other Linux Companies that did not fall into Microsoft’s extortion plan like; Red hat, Ubuntu and Mandriva to name just a few. Why hasn’t Microsoft not sued any of them? Mandriva, for example, is a small company. Smaller than SUSE, in fact. Well, once again folks, Microsoft does not want to take Mandriva or any other that did not fall into their extortion trap, because than Microsoft would have to reveal which patents they thought violated Microsoft’s and Novell and the others paying for Microsoft Certificates could see the lies and would not be able to stand up in court.

If Microsoft were to reveal which patents they are using as their bullets in the guns place against Novell’s head, would reveal the bullets to be blanks or duds. Novell could than counter suit for wrongful business practices, nothing new for Microsoft.

See, Microsoft is no longer an innocent Software Company out to create ‘Great Software’, as Bill Gates always put it to all his employees. Microsoft has turned into a criminal company, out to keep any ground it has managed to gain, and at any cost necessary.

It is sad, really.

Where can a fair player with real talent go?

A lone ‘rock star’ developer has little chance of making much difference in such a huge corporation. So, many of these genius innovators go the only other route available to them, to unleash their creative outlet. That other route is the Open Source route, which happens to use Linux and GNU tools to work from. Open Solaris and many BSD Unix flavors, are also under the Open Source banner!

Now anyone that has a brilliant idea can release their ideas to millions of other, like minded people, with no resistance from corporate policy. This is why Linux is the Hip new heaven for Geeks. In fact, Linux and Open Free Software is nothing new. It is only in the last decade, or so, that Linux and Open Source has been recognized as a real driving force in the economy of whole countries. Thanks to the Internet.

So, if you are beginning to feel the Microsoft Oppression, and you need a new creative outlet, come join your new friends in the Open Source World.

Where to start?

I will show you all the common places you need to visit, as a baseline, to get started. Also, the transition does not have to be all or nothing. I expect Windows to be with us for many years to come, so dropping your Windows dependencies is not entirely required. However, you will find all the programs you once needed as being replaced by Open Source tools.

I know Visual Studio seems untouchable. But, Open Source has some amazing specialty tools as well as a big one, called Eclipse.

After working in the Open Source and Linux World for a few months, the mere thought of going back to Windows gives you this immediate feeling of Oppression and Limitation. You can’t peek into the Windows Kernel code, you have to pay for Licensing fees that break your bank, and when you can do it better using Linux and free of charge gives you a feeling of stupidity.

All of these things I personally experience. After using Linux for a while, looking back only depressed me.

Communication Channels

It’s kind of funny to hear the critics complain that Linux and the Open Source World is so disperse, and a maze of choices, making it impossible to know where to start. In fact, Linux and Open Source follow a core set of principles, that are there, only because they are logical.

Every program in the Open Source world has a Website dedicated to it. This includes the Linux Distributions themselves. This is different from Windows, in that, most everything Microsoft related is located on Microsoft’s Developer Network Website. MSDN is a nice resource for looking up what you need. But, it also has become a daunting website to navigate. The menu system is overloaded with endless categories and subcategories.

Linux and Open Source does things differently. Each tool or program has its own dedicated Website and in most cases, domain name! How about that for separation for organizations sake.

We will start with the Distros. From now on, I will refer to a Linux Distribution as a Distro.

Every Distro, in existence, can be centrally found at one convenient Web Site.

DistroWatch.com

DistroWatch is a fascinating site in itself. It has a top 100 most popular Linux Distro listing. It also will provide details on any Distro you want to learn about, providing links to Download the software and their Official Web Site. DistroWatch is a must Bookmark website. You are going to want to use this site to learn about Distros, which ones are the most popular, why that is and finally how to get them once you decide what you want to try. Also, keep an open mind. It may take a few Distro Installs and usage periods to decide which one is best for you.

Packages

After you have your Distro, you can learn about all the programs that are packaged with the Distro or Linux Operating System. Each program is collected into what is known as a Package. Unlike in the Windows world, a program is not simply an .exe file and a configuration file you never touch.

A Linux program also comes with docs, man pages, examples, config files, support scripts and the executables. When installing packages all these different parts are places inside specific directories on your Linux Distro.

Example:
docs usually go into /usr/share/docs/[program_name]
man pages (manual pages) usually go into /usr/share/man/[program_name]
examples (scripts or whatever) usually go into /usr/share/[program_name]/examples
configuration files usually go into /etc/[program_name]
executables end up in /usr/bin or /bin or /lib depending on the role the software plays

You need to shift your idea of a ‘program’ by expanding it to think of programs as Packages, for the reasons just described. But, another more important reason has to do with code sharing.

It is a long standing Unix Tradition to share code and as to not reinvent the wheel, if you will. In the Windows World, sharing of code is done in the form of DLL’s. In Linux they are called shared objects or Linkable files. Whatever you want to call the idea of allowing programs to share code, Linux has a system too. Linux also has never suffered from any form of DLL hell.

This is where the Packages concept is so important. Some Packages depend on other Packages, such as a Shared Library. If you try to install a Package and that Package does not know which shared Libraries it also needs in order to function, would render the Package useless.

However, Packages are smarter than that! They contain what is known as Meta data that contains information the Package needs in order to ensure everything gets installed and everything works smoothly. Think of it as a food chain. A Lion is dependent on the Zebra, the Zebra on the grass, the grass on the rain and sun. If I try to install the ‘Lion Package’ than my package and package installer better be smart enough to know it also needs to install the ‘Zebra Package’ in turn it knows to install the ‘Grass Package’ and so on all the way down the dependency tree or chain until all dependencies are satisfied. Only then will the Lion Package be installed, knowing it will operate, now that all dependencies are installed.

Linux has a very sophisticated packaging system, that has over time, become extremely reliable and robust. It is a core feature of Linux Distro that allow it to patch security holes quickly and update software on a continuous relentless pace! It truly is amazing.

A Package is now this ball of information that entails the executables, docs, meta data, samples and support files. This is one of the great achievements of software design, that lends itself to allowing collaboration. Not only does this save development time, by using what others are sharing or have already written but it also saves, disk space and is one of the reasons why a Linux Install is so small. We only need to install what we need.

A Packages Official Web Site

Having a place to goto about a software package is very important. But, how does ones find that Web Site. The best answer is Google. If we are, for example, looking for the Web Site for the package Postfix, one of the many Mail servers available on Linux, we would goto Google.com and type in

Linux postfix

The reason I did not just enter postfix in Google, it to ensure that we are associating the word postfix with Linux. There are many Linux Packages that use animal names or names that may relate to things other than Linux. By placing Linux as a keyword, ensures we will most always find the results we want.

We see that postfix.org is the official web site for this awesome and popular mail server, which I personally use. Going to the site we are welcomed with information about the Maintainer, right away.

Side note here: Most projects will have a .org top level domain. Remember, that Open Source is normally not related to commercial or .com’s, but rather an Organization of people that build the software.

At postfix.org we will find everything we need, regarding Postfix. Download sources, joining their mailing lists, documentation, add ons and information about who is currently the maintainer of the Project Package. It is all there.

Note, Sometimes the maintainers spend a lot of time on the presentation, look and feel of the site, while others just put up a black and white web page with the most basic links. What is important is that the information is there and accessible. In fact, if you have a problem with how a web site looks, you can contact the maintainer and offer to vamp up the site and make it look pretty! That is what the Open Source world is all about, my friends. Doing pro bono work is also a great way to build a portfolio if you are looking to show proof that you do have the skills you claim to have to future employers. That is what I did.

Project Maintainers

Every project has a maintainer. Sometimes more than one. Most the time, the maintainer is the inventor or originator of the project. They started the projected, contribute the most code, so naturally have the most say in the whole thing. You will find that Open Source, even though it is Open, it does have structure and organization to it’s madness. In fact, there is no madness to any of it’s methods.

But, what happens if the original maintainer dies or quits? In many cases, projects have a long list of former maintainers. Projects get passed around and change hands. This is very common. Not to worry, if the project has enough value and developers working on it, they will find a new project lead or maintainer and appoint them, update the site and all is back to normal.

Sometimes, you will use an Open Source Project that really is ‘dead’. Dead as in no one has updated the site, code or anything for a year or more. In cases like this a few things can happen. First of all, the software is perfectly fine and usable. You just might not get any bugs fixed. But, if the software project is usable, then by all means use it!

If you are competent at the language the project is using and you know how to operate an Open Source Project, than you may be able to adopt it.

If the project is important to other projects, as in their depend on it as a shared library, they can adopt it, to become it’s Maintainer. After all, the code is all there. No fork is needed.

It’s a perfect and beautiful way to make software and a perfect example of why chaos is not the result, but rather the opposite.

If this was a proprietary software company that suddenly disappeared or changed it’s name, many things would happen.

First the legal aspects, in fact everything is the cause of legality reasons. Trademark names, copyrights and fights over who gets the rights to the code. All of which would be fought in court, costing thousands of dollars in bullshit legal squandering.

Open Source is immune to this, because Open Source programmers are smarter than your average bears. They care about the software and how it can be integrated into the Open Source World. They don’t care about the legalities, since all of it can be resolved internally between themselves. All they care about is that the software get’s preserved so that the march can continue.

Mailing Lists

The best thing about all Open Source Projects is that they almost always have a Mailing List. Anyone can join the conversation and you can get to know the maintainer and all the participants. You can get to know how the project works and how they actually do things. Everything is Open and out there.

Also, there are usually multiple mailing lists, which are meant to keep certain discussions from needlessly drowning out others. The most common are Discussion and Developer Mailing lists. You may have no desire to help develop and contribute code to the project. But, you may want to know what new features are coming or ask general questions as a ‘User’ of the program. You need to join the right mailing list.

There is no one stopping you from joining the developer list, if only to silently read and see what the hell they are talking about, out of your own curiosity. This is completely acceptable and can be interesting. Just remember, don’t blabber mouth out a comment or question to the the wrong list!

All decisions happen right there in the mailing list. New features and even the occasional flame wars. Yes, it is not always cheery with rainbows and butterflies on these mailing lists. The people on them are professional passionate programmers. Depending on the friendliness factor of the project, if you ask a stupid question, that they deem stupid, could get you a response that may scare you and prompt you to unsubscribe from the list, never to return. While other lists are more forgiving to new comers and are happy to help you out.

One thing is for sure, regarding the mailing lists, they are moderated and it is best you say what you need to say in a clear and intelligent way. This will earn you karma and respect points. If other developers find your responses thoughtful, intelligent and formated well, they will reciprocate with code secrets of their own and may even result in making a friend or two.

There are entire docs written on the subject of proper mailing list ethics and procedures. I am not going to reiterate all that stuff. I will provide a link or two below, which you can book mark for your reference.

Open Source Mailing List Ethics

Maintainers of all Types

I kind of lead you on by saying that all Open Source Programs were packages. Did you ask yourself who does all the packaging work? Someone has to do it.

Open Source software is always distributed in Source Code form, when delivered by Upstream.

Upstream

Upstream is a term you must familarize yourself with and know what it means in the Open Source World. Upstream refers to the developers that created the Software Project, which also might maintain the Office web site, as well. Upstream can be thought of as a mountain stream where rain water collects and begins to flow down the mountains. The Software is the run off, or stream and he mountain is what is making the water flow downward. All software is destined to one of the many available Linux Distributions, out there. Upstream can be thought of as the top of the mountain or where the software is created which then trickles it’s way down the stream to the base of the mountain, which is the entire Linux Distro.

If you go from the base of this mountain, called Mount Distro, and claim upstream to the source of say the Postfix software project, then we say Postfix upstream is the location of where the Postfix developers are.

The reason there needs to be a distinction between Upstream and Downstream and ‘the base of the mountain’ is because of Bug Reporting and fixing. What happens if the Linux Distro finds a bug and needs it fixed? Typically the bug is reported to ‘Upstream’ or to the guys that develop the software with the bug. Unfortunately, upstream developers do not immediately fix bugs that are filed. A Distro may not want to wait for the upstream developers to fix the problem, so the Distro fixes it themselves. However, this creates a small, temporary fork of the code. One fork of the code with the bug in it and one with the bug fixed.

The situation can get complex and messy. It is up to the Distro that fixed the bug to maintain the patch and any others so that upstream can get a hold of them to then us them to fix the bugs.

Compiling from Source

The great thing about having Source Code you can compile, instead of installing precompiled packages, is that you can take advantage of your hardwares strong points. An example is AMD processors have differences from that of Intel processors. 32 and 64 bit machines also benefit if the source code is compiled for their architecture. It is up to the user to compile the software on whatever hardware they happen to be using. Linux software works on more hardware types than any other software in the world. Also, some may want this or that feature while others may not, in order to make the software run faster. The only way to satisfy these needs, is to distribute the software in Source form.

Package Maintainers

Not everyone is able to compile source code. Especially, mom or grandma. That is where Packages once again come in to play. Packages are precompile, have worked out all the dependency issues and can be easily installed and managed with a package manager.

Someone has to make a package of a software project. Making packages is actually a skill in itself. Also, just like everything in the Open Source World, there are choices in types of Package Formats. The two most common are DEB and RPM package formats. My personal choice is DEB packages or Debian.

In turn, DEB or .deb packages are maintaned by the software program apt-get or just apt.

An example in installing a Web Server with a single command is as follows.

apt-get install apache2

With that one command we install dozens of other packages ( .deb files ) that apache2 depends on, which are installed first, which apt than finally installs apache2. Apache2 is the package for the Apache version 2.2 Web Server, which happened to also be the most used Web Server on the Planet, at the time of this writing.

That is about as far as I will go with the package manager. Just know that each Linux Distro will use either DEB or RPM based packages. Easy enough? Only two to worry about.

The point of this article’s section is that for every task that needs to be done, there is a maintainer.

  • Maintainer of an Open Source Project
  • Maintainer of a DEB package for a Specific Linux Distro like Ubuntu
  • Maintainer of documentation for a specific Open Source Project
  • Maintainer of a project’s Web Site
  • Maintainer of a project’s mailing lists
  • Maintainer of a projects artwork
  • Maintainer of a projects server hosting plan or hardware

As you can see, a Maintainer can mean any task that needs to be done. The work load is divided up this way. So, if you have extra time on your hands, chances are there is a need for someone to step up as a maintainer of something. This is how Open Source is made, this is how we end up with entire projects like Ubuntu, a fully user friendly Operating System that is putting Microsoft’s underwear on fire!

it is almost too amazing to be true. But, if you figure in the number of people on the planet (9 billion plus), all the diversity of interests there are (everything imaginable) and people’s social desire to connect with others that enjoy similar things (if you are human you need to collab with other human beings), and a way for them all to communicate (the internet) and the big picture as to how and why this can happen, becomes apparent!

Linux and Open Free Software truly is a global project completely free to join, free to leave, free to take a break, free to spent every waking moment thinking about or whatever. It is nature and software is the result. Beautiful software that sings to us, restriction free and accessible to anyone that wants to contribute or use it.

Stop, hold on, I’m literally going to cry.

What now?

So, I’ve introduced you to how the Open Source World works. Depending on your skills, desire and how well you can ‘google’ will tell you what to do next. I can not tell you what to do next. If I could i would be Open Source God and of which there is not one, at least not one that I personally know.

The best advise I can give you is this.

Open a Browser. Dont matter which, could be Firefox, Opera, Safari or OK OK Internet Explorer.
Goto google.com or yahoo.com or OK OK live.com
Use your fingers guided by your brain and begin exploring where YOU want to go next…

Enjoy and Best Wishes.

Before you think about becoming a Hacker…

Friday, September 5th, 2008

Anyone aspiring to take on the mythical task of becoming a Computer Programmer, Hacker, Coder, Computer Engineer, Scientist or whatever you want to call us, often asks themselves, “What programming Languages should I learn first?”.

This simple, yet important question is one that is often hard to find the answer to. You can ask current Programmers what they recommend and they all might give you a different answer. You could consult your college counselor of the Computer Science Department, but they often return biased answers because of the College they work at.

There are so many different Computer Languages, no different from the hundreds of Spoken and Written Human Languages.

The following is my take on trying to answer this for you. I will first tell you strait up what you should learn and in what order, depending on what General Subject you want to begin to study.

Step 1 - Decide which Platform you want to Program in.

  • Windows - Win32 Platform
  • Unix / Linux Platform
  • Macintosh or Apple’s Platform

There are many many more platforms, but it really comes down to these 3 Platforms. In fact, the line between two of the three platforms I mention are very blurry, because Apple Macintosh is actually derived from a Unix flavor, called BSD. In turn, Linux was greatly inspired by Unix, so many of the idioms and programming jargon intertwine.

I personally started on the Microsoft Windows (win32) platform. But, I easily took the knowledge I learned about programming in C++ on Windows and translating it to C++ on Linux, with little effort. Thankfully, Computer Languages tend to not change, too much, from Platform to Platform. C++ on Windows is a bit different from C++ on Linux, but not to the extent that they are so different they are indistinguishable.

So, what this comes down to is that which Platform you choose really should be the Platform you mainly use on a day to day basis. This may be due to your job only using Windows or all your friends using Linux or Apple OS X. I recommend you just pick the Platform you are currently most comfortable with. After a few years, you will branch out, due to curiosity, to other Platforms, if you like Programming and actually get something out of it.

Step 2 - Decide what area of Computing you want to begin learning.

  • Web Development
  • Game Development
  • Server Administration
  • Systems Development

There are many sub systems of a Computer System. If you get tired of Web Programming, you have freedom to move to another sub system of the Computer.

What I recommend, is to pick Web Development. The reason I recommend this to first time Programmers, are two fold.

1) Web Development involves lighter topics then say, Kernel or Device Driver programming. Web Dev uses Languages that are actually Mark up languages that do not require compiling your code every time you want to see what it does. Also, a debugger is not necessary. This is perfect for getting your feet wet in the World of Programming Computers.

2) Has to do with the notion that you are networked from the start with other Programmers, Tutorials and Guides that the Internet offers. If you are Programming and you need help, your already on the Web and Programming it. Vast amounts of resources in terms of People, Documentation, Guides and Tutorials are all at your finger tips.

Now, the same can be said of choosing any other sub system, you can get on the Web and Google Search, ‘How to program Drivers for Windows or Linux.’, as you could for Web Dev. So, it is up to you. It is also up to how comfortable you are with Logic, Problem Solving, Arithmetic and getting quite a bit Geeky.

A final reason why I recommend Web Dev over more heavy subjects like Kernel Driver Programming is that you need to first see if you “Have what it takes.” to even begin to think of yourself as a Computer Programmer. Programming is not for everyone. I have seen many of my past fellow classmates drop out after the first ‘dose’ of what was to come! Web Dev, I believe, slowly gets your feet wet, without potentially scaring you away. Later, after you have determined this is something you want to do and can do, you can just as easily go down the path of Systems Development and becoming a heavy hitter or a Hacker. Not to be confused with malicious behavior like a Cracker.

Step 3 - Choosing your Computer Language

This choice depends on what Platform and Sub system you choose earlier. You are lucky that most Computer Languages translate from Platform to Platform very easily. Many of the languages, mostly Open Source, were not Cross Platform friendly, as they are today.

Languages from the two major schools of thought are Closed Source vs Open Source. You will find you can program C#, a Microsoft Language, on Linux using Mono. I believe every major Open Source computer programming language has been ported to work on Windows! So, be thankful of that.

The following is a list of languages that I will assign 3 traits to, after the name of the language.

Example:
Language Name
- Platform best suited for.
- Main purpose the language is used in.
- Compiled, Interpreted, Scripted or Mark up

The last trait — Compiled, Interpreted, Scripted or Mark up — each of which I describe below.

  • Compiled - Languages that must be compiled, by a compiler, before they can be executed.
  • Interpreted - Languages that do not need to be compiled manually, instead they are compiled on-the-fly.
  • Scripted - Languages that are mostly Platform specific and do not need to be compiled to execute.
  • Mark up - Arguable not an actual Language, but in our case is and did not require compilation.

Don’t worry too much, about the list above. It is not important, as much as, just diving in and learning. But, you will, in time, learn what all of this actually means. I describe it here, only so I can include the trait in my list of Languages below.

C
- Any platform
- Systems Programming, Kernel, Driver and low level Programming.
- Compiled

C is what I like to call, a foundation language. C is the basis for which other languages were derived from. In fact, some languages are really just C programs, but with a new syntax to make writing C easier. Many argue that learning C should be the first language you learn, because once you learn C you can easily learn any other language from there going forward. However, C is a very anal, if you will, language. It does not hold your hand, it is not tolerant of typos or even the slightest error. In fact, this is what makes C so powerful and the most widely used Cross Platform language to ever exist.

C++
- Any Platform
- Systems Programming, Kernel, Driver and low and high level Programming.
- Compiled.

C++ is a derivative of C. Put simply, C++ is the OOP — Object Orientated Programming — addition to regard C. C++ introduces the concept of OOP, which is a deal breaker for a lot of aspiring programmers. I say, deal breaker, because many programmers that start out just fine in their studies, until they hit the OOP block. OOP is a programming style, of which, many do not understand and therefore quit programming, altogether. OOP is beyond the scope of this article. C++ is just like C, only with added features that make programming large and complex software programs easier to read and maintain. Some programs are basic, like a basic Calculator, but a 3D Graphics program like 3D Studio Max or a photo editing one like Adobe Photoshop are enormously complex. These enormously complex programs can be made possible, with languages like C++.

PHP
- Windows, but was originally derived on Linux
- Web development, arguably the best language for this task.
- Interpreted

PHP has become the, de facto, programming language of choice for Web Development on the ‘back end’ of Web sites. ASP is Microsoft’s answer to PHP, but PHP is now over shadowing ASP, even on the Windows platform! PHP is a cross between C and Perl. PHP uses C syntax and logic, because it was originally created to make C programs, but using PHP syntax to make writing the C program easier and with the focus on replacing Perl as the back end language. PHP is really just a wrapper around C. As I mentioned in the C language summary earlier, C is very unforgiving to even the simplest mistake. PHP on the other hand allows for a much easier to read and write programming language. In particular when it comes to mixing HTML with PHP. If you want to focus on Web Development, on the back end, PHP is really the only sane choice. There are other choices, but if you want to save yourself time, PHP is the language for such a task. It allows you to easily connect to all types of Databases, process HTML and create dynamic Web Sites that rely heavily on a Database to store content. Examples of Web sites that use PHP and heavy use of a Database would be News Content portals, Social Networks and Blogs or Web Logs.

JavaScript
- Any Platform
- Web Browser logic
- Interpreted

JavaScript is the language all Browsers use to control them, pragmatically. It is possible to use VB Script, but even Microsoft’s Internet Explorer defaults to JavaScript. It is a loosely typed language with basic classes and functions for easy string manipulation, walking the DOM and Ajax. If you want to be a Web 2.0 programmer, you need to know JavaScript. Chances are you will be using a JavaScript Library or Toolkit, like Dojo or JQuery. JavaScript can turn your plain old Web Browser into an interactive GUI application. Now more than ever, programming is moving off the Operating Systems and into the Web Browsers. Gmail, Yahoo! Mail, Google Docs and more are all software programs that invented a new type of programming known as Software as a Service or SaaS.

HTML
- Any Platform
- Web pages
- Mark up

HTML is the structure of all Web Pages. It is not technically a programming language, but for our purposes it will be. The definition of a Programming Language is one were you have code that executes line by line and able to create logic flow based on the state of variables within the program. HTML has no logic control, that is what JavaScript is for. So, HTML although not a Programming Language is a Mark up Language or Protocol transmitted using HTTP on top of TCP/IP. HTML will help to train your mind to think like a programmer, without it being too intense. Learning HTML tags and attributes is a good seeding point to get your brain cells aligned and the wheels spinning in time to learn to Program.

CSS
- Any Platform
- Web Browser styling
- Mark up

CSS stands for Cascading Style Sheets. It is a way to stylize Web Pages. It is also a way to theme Web Sites by placing all the styling instructions into a seperate file or location make it easy to swap different CSS files for different theming or stylizing effects, without having to update the HTML. CSS was invented to make stylization of many many Web pages easy to change and without having to rewrite entire HTML web pages. CSS like HTML is not a Programming Language, although there are some attempts by Microsoft to add some logic control code. But, just because Microsoft tries to allow this, does not mean that is the standard.

Perl
- Windows, but originally derived on Unix and Linux.
- All purpose, multi-capable, no definitive purpose
- Interpreted

Perl is one of those languages, I find fascinating. That is not to say, I like Perl though! Perl has been around for a very very long time. It is the original Web Dev language, until PHP put an end to that. Some would argue, that Perl has become too complex. You can do more tasks, in one line of Perl code, than any other language. This results in code that looks almost unreadable. Perl is truly, the Geekiest of any language, ever conceived. As a result, many gravitate toward it. It can do anything from acting as a simple shell script to a full blown GUI application. Perl is also referred to as, a duct tape language, in that, it is so versatile and complex, you really can do anything with it. But, like I said, it is very geeky and very hard to learn, read and program with. The creator of Perl, Larry Wall, 100% reflects in his personality the personality of Perl. Love it or hate it, Perl is one of those languages you ought to know, at least a little about, but are not expected, by any means, to feel unworthy if you find it overwhelming!

Python
- Linux, but has been ported to Windows, as well.
- GUI Applications
- Interpreted

Python is a new comer as a Computer Language. Yet, Python has exploded in popularity. What Perl is to unreadable code, Python is to very readable code! Python has one of the cleanest syntax of most any language. It does this by using tabs and indentation, which you should be using already, to structure your code. There are no curly braces to indicate new code blocks like class, functions and logic control statements. It is a pure Object Orientated Programming language. It’s main usage has been application programming, but is capable of just about anything. Shell scripting, Web Dev and more. This is due to it’s modular design. If there is a function that Python can not perform, it is relatively easy to write a module to make it happen. Perl, PHP and any other Programming language is capable of the same. Some call the modules, libraries, but is essentially the same thing. It is simply a matter of how many are willing to contribute to the building of these modules or libraries that make a Programming Language powerful in different areas of the Computer System. People love Python’s easy to read syntax, which results in a lot of people writing the modules and libraries.

Java
- Any Platform
- GUI Applications
- Compiled

Java was the first language to try to be truly, cross platform. This means if you write a program for a platform like Windows, it will also run, with no modification (porting), to run on another platform, like Linux. It is also a truly and completely Object Orientated Programming language. Everything, even main(), must reside in a Class. Java also made programming easier with the removal of pointers. Pointers are powerful, but also error prone making memory leaks easily possible. Java also has a Garbage Collector. A garbage collector is a mini program routine, that periodically runs to prevent or remove entirely, memory leaks. Many argue that Java does not teach a programmer how to properly think like a programmer, because of all the hand holding it does. Java did have the potential and expectation of becoming the language of choice for everything and on every platform. But, for many reasons, this never happened and Java has now become over rated. Java is taught as an Introductory Computer Language. But, I tend to agree, Java may not truly make you understand the inner workings of a computer. What I got from Java was the ability to understand OOP (Object Orientated Programming). OOP is a very important concept to learn and Java, since everything must be an object/class, forces you to learn OOP.

C# - pronounce ’sea sharp’
- Windows, but recently ported to Linux
- GUI applications
- Compiled

C# is Microsoft’s answer to Java. In fact, C# looks identical to Java. C# also uses a virtual machine to allow it to be Cross Platform. C# is also Microsoft’s answer to the gripes that C++ Programmers had. The removal of pointers and a Garbage Collector also exists to aide the Programmer. C# expands on Java by also allowing points, if the programmer wants to use them. But, C# is a part of a greater idea, being it is a .NET language. A .NET (pronounce dot net) entails any programming language that has been ported as a .NET language. Visual Basic .NET, C++ .NET, Jscript .NET, IronPython .NET and many more are all apart of the Microsoft .NET framework. Microsoft got it right, with their .NET frame work idea. It is possible to write a C# program that also includes Visual Basic .NET code or any .NET language! The idea of allowing dozens of languages to act as one, is a powerful way to program.

.NET is a Microsoft framework, that allows any .NET enabled language to intertwine. This is possible, because of an Intermediate language byte code that is produced by all .NET languages. This intermediate code is than executed by the CLR or virtual machine. This virtual machine ran run any .NET code, resulting in the ability to easily use a VB function or class in a C# program and vice versa. .NET really is exciting, from a programmers stand point.

A Linux ‘rock star’ programmer by the name of Miguel de Icaza, ported C# to the Linux platform and called it Mono. Mono is one of the most controversial Linux projects ever created, because many view Microsoft as an Evil corporation and the idea of programming anything on Linux using Microsoft technology, is frowned upon. Even though Microsoft essentially ripped off Java and called it C# as well as, Java’s virtual machine that executes intermediate byte code and called it .NET.

Never the less, if you are going to program on the Windows platform, .NET is what you will be using.

Download the Express (free) version of Visual Studio .NET

Step 4 - Deciding what Tools to Program with.

You are going to need a text editor, at the very least. A more powerful type of editor, designed for programming is known as an IDE. Integrated Development Environment. The difference between a text editor and an IDE, is that, an IDE can code assist, debug, fold/unfold code, navigate multiple files via functions and class methods. A text editor may include code highlighting and maybe code folding, but that is about it. The advantage of a good old text editor, is that it is responsive, light weight and perfect for quick edits.

The Windows Platform will most likely result in the use of Microsoft’s Visual Studio. You can get the Express (free) version or the Professional / Enterprise paid version. If you are just starting out, using the Express version is recommended, because the versions you pay for can cost upwards to a $1000 or more. Working for a company? Getting them to buy you the Professional / Enterprise Edition is your next bet.

The Apple OS X Platform is essentially Unix at the core. A Macintosh shell terminal runs vi, emacs. Xcode is Apple’s programming IDE that comes included on the install CD/DVD. However, Eclipse is also widely encouraged for use on a Mac, just as it is on Linux. I have never programmed a thing on any Mac, but since Apple OS X is just Unix, with a pretty GUI, makes it very Linux / Unix like.

The Linux / Unix Platform comes packed with numerous options. The closest thing Linux has to Visual Studio is Eclipse, also capable of running on Windows. The range of choices can become daunting, for the Linux new comer. My best advice is to start using the following two tools. You can experiment with the others in due time.

Eclipse and gEdit.

Eclipse is the mother IDE of them all. It is modular and capable of literally morphing itself into any programming IDE. This includes; PHP, Python, C, C++, Java, HTML, JavaScript, CSS, Ruby and even C#. It can also act as an FTP client, team collaboration, version control client and more. Eclipse is a framework for building and IDE with companion tools, all integrated together. In many ways, Eclipse puts Visual Studio to shame. And that is no small claim, because MS Visual Studio is awesome in it’s own right.

gEdit is a feature full text editor. gEdit can highlight just about any programming language, includes built-in FTP, secure remote editing and tabbed windows. gEdit is also very light weight and responsive. gEdit, like Eclipse, is also modular. If you want the code folding feature, there is a plug in you can easily install to make it happen. gEdit, however, was meant to be small and light weight, so if you want debugging and code assist, use Eclipse.

Do you really need code completion or code assist?

Code assist/completion is a feature where a text pop up or menu attempts to understand what function or variable you are trying to type. For example, if you start typing,

function mysql_

al pop up or menu of all the functions beginning with mysql_ will be listed. This allows you to select the remainder of the function. In other words, you could end up with the following,

function mysql_connect(param, parm, parm …

It assists and completes code you are typing. It also will list possible arguments the function may allow, and may even include a small summary of what the function does. It is like having a manual of all the functions and possible arguments, built right into the editor or IDE.

But, is it really necessary? Is this lazy programming? Can’t the programmer just look up the functions from the manual and learn that way?

These are all good arguments. In someways code assist/completion can get in your way. It can be annoying to constantly have something pop up and suggest things. It can also slow down how fast you are able to type code, because the code assist analyses every key stroke while trying to determine what your typing. I believe, you will become a better programmer, that knows the language better, if you manually look up functions and study the possibilities yourself.

It is really up to you.

I think at first, it is OK.

But, try to study the manual as well. Don’t entirely rely on code assist/completion to be there for you.

How I learned PHP so well, was because I used the editor called Ultra Edit 32, which is much like gEdit. It had no code assist, no code folding and nothing fancy. I relied on the CHM version of the PHP manual to look up functions, resulting in an intimate understanding of the general functionality of PHP.

Granted, it is not possible to memorize every little function and argument and their order. Nor will any good programmer tell you that you should. But, it is good for the learning experience, to not rely on your editor or IDE to do too much of the thinking and typing for you!

Do you need code folding?

Code folding is simply the ability to roll up a function so only one line of code represents the entire function. A plus sign little icon is usual next to the folded function to allow you to expand or unfold the code so you can view it. This is a wonderful feature to have if you have dozens or hundreds of functions in a single file. It is nice to see a listing of all your functions, line by line, instead of having to search or scroll the entire length of the file.

However, code folding has to work well in your editor or IDE. If it doesn’t fold and unfold code quickly or causes little glitches, in some cases can even insert random bits of data, than you should either get a new editor or turn off the code folding.

Do I need a debugger?

A debugger allows you to execute your program line by line or jump to than stop an break points that you may have set. You can also observe the state of all your program variables. A debugger really is essential when programming in C or C++ or any project that is huge. But, if your programming a Web site using HTML and a little PHP, perhaps even some JavaScript, a debugger may be over kill.

If you do not have an IDE or editor with a built in debugger, it is quite easy to debug the code by adding code that dumps the contents of specific variables to a file or screen. Especially when doing Web Development, it is almost always not necessary to have a built in debugger, since PHP scripts tend to be quick and to the point. I usually echo() or print() variables to the Web Browser in parts of the code I am trying to debug. There are so many editors and IDE tools out there for Web Dev that make a big deal about debuggers, when it is all just more distraction and complication to deal with. Using a debugger can be a complicated process itself, on top of having to keep in your head the program your writing.

So, my advice about debuggers is this. If your Web Deving, using PHP, HTML, CSS and JavaScript, no debugger is needed and in fact is added complication and more distraction. Just use echo() for PHP and alert() for JavaScript. All of the languages just mentioned are Interpreted and not compiled, so tend to not require a full blown debugger to isolate and troubleshoot problem code.

If your programming a C or C++ even C# project, chances are a debugger won’t hurt. This is because these languages are compiled languages which means you have to compile than execute/run your code. These types of languages also are used in more complex GUI applications with a lot of functions, buttons, menus and widget controls to build and add logic to. A full featured debugger complete with break points and stack and register views for observing memory maps and such, become beneficial to you at this point.

So, if coding Interpreted Languages, No, Debugger not Needed.

If, coding Compiled Languages, Yes, Debugger is Recommended.