What Steve Oualline thinks of C++

31 May, 2007

C++ is a powerful, highly flexible, and adaptable programming language that allows software engineers to organize and process information quickly and effectively. But this high-level language is relatively difficult to master, even if you already know the C programming language.

I’m sorry, Steve, but I think the 2nd sentence isn’t true. The only two languages I knew before this were BASIC and Python, and I’m picking up C++ rather quickly.

Readers, don’t be afraid to try out C++, it’s very rewarding, and I’m enjoying very much.


Installing Software on Linux (cont…)

31 May, 2007

The last post I wrote about installing software on Linux, I only mentioned the sh function with .bin files and ./[program-name] to run the installation program. Now, I will somewhat extend on the latter.

Most of the times you download software for Linux, it will be messy, uncompiled code. If you open up the terminal (after unzipping the .tar.whatever file), navigate to the folder using the cd command (remember: Unix is case-sensitive unless you’re on the Mac platform) and run the following commands in order (if it’s a tar.gz file):

tar -zxvf [filename]

make install

Now, to run the program, check the Applications menu of your distro. It will probably not be there. No worries. Launch your terminal and type in the name of the command (like googleearth or gftp) for the program to start up. Just so you don’t forget what programs you installed on your machine, keep a little text file just in case.

I have somehow actually successfully installed some Linux software on my Mac with X11 – comes free on your OS X installation disk (X11 is the Unix windowing system – Apple built something in a way that you can’t do that through terminal …. go figure!). However, depending on the software you’re installing (like gFTP vs. FireFox), one (in this case, FireFox) may take longer to work than another.

****-Oriented Programming

31 May, 2007

Ok. Recently I abandoned C for C++ because at the library, searching for a book about C programming, the only book I saw was “Practical C++ Programming”, by Steve Oualline, published by O’Reilly publishers. It is a very good book, and I reccomend it to anyone who wants to learn C++, but that’s not the point. While reading the beginning of the book, I saw that C++ is what’s called an object-oriented programming language. I had heard about object-oriented programming for quite some time but didn’t bother to look up what it means. Today, out of curiosity, with my trusty friend Google, I found that the opposite of an OOPL is what is called a function-oriented programming language , or a procedural programming language. So I got even more curious. What are the differences between these?

An OOPL is made up of objects, while a FOPL is made out of functions and procedures. With OOPL’s objects you can define

the abstract characteristics of a thing (object), including the thing’s characteristics (its attributes, fields or properties) and the things it can do (its behaviors or methods or features).

Now, what about FOPLs? With FOPLs, you have certain functions scrambled all over the program, and you can skip around from one to the other and things like that. If you’ve ever used the GOTO command, you know what- I’m talking about. Since I still don’t know how to use classes in C++ (I’m still on chapter 9 of 30), I use the GOTO function every now and then…. reminds me of my old QBASIC days…..

digg it

A Nifty Web Tool

29 May, 2007

A quick trip to the Google Docs website will show you just how useful it can be. I usually have too much on my hard drive, so just a quick upload onto Google Docs will ensure me more hard drive space and a reliable document backup server. These documents are securely kept, although you may share any of them with another Google user (that is, as long they’ve registered for a Google account).

Now, many of you have heard about how Microsoft copied so many things from Apple (and I’m sorry, Bill, but some of the features and the look/feel of Windows do resemble the Mac OS quite a bit). But it also seems that Office 2007 was based off of Google Docs…. or did Google copy off of Microsoft? Now a quick trip into the computer world past shows us that Microsoft started its Office 2007 job around mid-2005 to late-2006 (correct me if I’m wrong here) and when Google Docs began, it wasn’t even Google Docs! It was Writely, which began, I believe, at around the same time. So, none of them are guilty, so freely use them without having remorse of using a copied product!


WebOS – is it just a FACTAS?

28 May, 2007

Many of you may have already heard of WebOS’s, online operating systems to store your files, apps, …. wait a moment …. operating system? Not really: you need an operating system to run a web browser, and the browser runs the WebOS. Although it’s called an “online operating system,” it’s more like a “flash application connected to a server.” So, we’ve heard of WYSISYG (what you see is what you get), so what’s so bad about a FACTAS? I mean, a computer computes – it’s based off of zeros and ones. A keyboard is a board of keys to press. A mouse is a device that resembles a small furry mammal (hey, at least they look alike). A trackpad is a pad that tracks finger movements. Do I need to go on? YouOS, change your name to YouFACTAS or something. The name might really confuse people.

But they’re still useful. I mean, YouOS is a pretty nice one. For more good ones, visit the big WebOS roundup article.

Let Michael do the Job

25 May, 2007

A quick visit to Ubuntu’s website and you’ll see a quick little ad:

Ubuntu is super easy to install, but why not have Michael do the work for you? Ubuntu on Dell. Available now. Configure and Buy!

I think this’ll be a great turning point for both Dell and Canonical : Linux will be more well-known, and Dell will possibly raise its extremely low stock quote. Also, for the general public, computers will be two-hundred dollars cheaper!

Now, the only weird thing I find in the picture is that the monitor isn’t connected to the tower…..

A Simple Lecture on Operating Systems

23 May, 2007

****I’m a beginner to this depth of computer science – please leave any comments with corrections if any errors are spotted. Thank you!****

I’m forgetting about Python and learning C. I’ll need it to write the OS I’m working on. Well, I’m not forgetting about Python entirely, but I’m abandoning it for good reasons.

First, every time the user you run a Python program, it needs to be interpreted. This may cause pain for the user, having to use chmod +x over and over again. What is the difference between interpreting and compiling? Compiling is when you have the pure source code and you save it in runnable machine-language form. In C, it’s only done once, which means the developer can compile it once and the user doesn’t have to go through the pain of compiling for every time they download the file. They just click, and off they go! In Python, ¬†an interpreted language, the code is sort of like a one-time use camera: you type in python foo.py and foo.py is run, but isn’t saved as an executable. Also, C is more widely used in Windows PC’s, the most widely used platform in the world (Python only comes pre-installed on most modern UN*X systems).

Secondly, it’s harder to write an OS in Python because it’s so distant to Assembly, the main OS language. It’s easier to write an OS in an assembly-C(++) combo.

In an OS, the main boot file (the file that boots the computer) is written in assembly, while the actual OS program is written in C. The makefile basically describes how the system is built, and all that to run a simpler C program.

Now, why is it easier to write an OS in C than in Python? Let’s see the family tree (these are metaphors)!

“And Fortran created the Programming Language World, and upon it placed Assembler. Assembler begat C and C++, fraternal twins, and BASIC. Now, the twins moved to a far away land. And the twins begat Perl, who in turn begat Python. Perl was very different from his father due to the fact that he was born so far away from his father’s homeland. Now, Perl was dumbed down compared to his father, and Python was not the brightest around.”

Python is really far from Assembler, like BASIC. None of BASIC’s “descendants” can be used to program an OS.

What about some semi-modern OS’s? UN*X and DOS, for example. UN*X is written in an Assembler-C combo. DOS is written in an Assembler-Batch combo. Batch is a language the developers made to ease their writing of the OS. Batch is a really quick and easy language, somewhat like BASIC.

That’s just a basic lesson on operating systems, a fundamental step to studying computers. But this is just a scratch on the surface of a wonderful science.

digg it