Friday, October 30, 2009

Final Grades

Hi Guys!

Huwag kayong magtaka sa output ng grades ninyo, dahil I chose to alter the percentage make-up of your grades.

I would like to know how good you are without the help of anyone that's why I decided to drop the Machine Project to 5%. Yes you've done well and have not slept for days for your 2 MPs but what I want you to realize is in the end, what matters most is what you've learned from those sleepless nights. Anyways, this has benefited most, if not all, of you.

The final break-down of your grades is as follows:
  • LE 1 - 25% (Over 70 instead of over 90.)
  • LE2 - 30% (To measure how much you've understood.)
  • MEs - 40% (To measure how much effort you've exerted in every meeting. Sorry for doubling this, I just feel that you deserve to get the most out of your burdens.)
  • MPs - 5% (Some of you have done quite well, though some have shown hints of cheating that's why I've decided to lower this down. Sorry for those who have exerted much to this requirement.)

There were no magic done to your grades. If you have any questions, kindly e-mail me.

Please remember that numbers are not the measure of your worth.

Thursday, September 24, 2009

ANNOUNCEMENT!

My email address is: wilmarclopez@gmail.com NOT yahoo.com.
Hindi ko matatanggap ang mga pinapasa ninyo doon.

Please be responsible! Thanks!

Friday, September 18, 2009

MP 2 Extended

MP 2 deadlines will be the following:

THWX1: Tuesday before class
FWQR and FWUV: Wednesday before class

Kindly send me your codes via e-mail. Please bring it to class with you too.
Thanks!

I would like to apoliogize to my THWX1 class. Sorry.

God bless!

Thursday, September 17, 2009

ANNOUNCEMENT!

I'll do my best to be at our exam venue as early as possible, around 6:30 am siguro.

Kapag dumating kayo, papaexamin ko na kayo agad.

Wednesday, September 16, 2009

Schedule Announcements for the Hands-on Exam

All exams will be held at Teaching Lab 2, UPAECH/Engineering Library 2 Building.

Schedules:
  • THWX1 (TTh): on Thursday, September 17, 6:00pm-9:00pm
  • FWQR and FWUV (WF): on Friday, September 18, on your respective class times.

Other notes:
  1. Open everything. You can bring any number of books, notebooks, notes, even flashdisks.
  2. No internet access.
  3. No talking with anyone except with me.

God bless!

Monday, September 14, 2009

Pointers for the Hands-on (Third) Exam

Please familiarize yourself with the following functions as you will use them on your exam:

atoi()

Syntax:
#include 
int atoi( const char *str );


Description:
The atoi() function converts str into an integer, and returns that integer. str should start with some sort of number, and atoi() will stop reading from str as soon as a non-numerical character has been read.

Example:
i = atoi( "512.035" );

RESULT: i set to 512.


atof()

Syntax:
#include 
double atof( const char *str );


Description:
The function atof() converts str into a double, then returns that value. str must start with a valid number, but can be terminated with any non-numerical character, other than "E" or "e".

Example:
x = atof( "42.0is_the_answer" );

RESULT: x set to 42.0
Source: http://www.elook.org/programming/c/atof.html


No need to learn complicated matrix operations like those involve in finding solutions to linear equations. You just have to know the Basic Matrix and Row operations.


Good luck!

Friday, September 11, 2009

Exam Pointers

All sections will have their Written exams first.

Written ( will be considered as your Second LE )
Types:
  1. Indentification
  2. Why, How, What, Explain-this, Discuss-that types of questions
All of the concepts are of course on the slides but there is a difference between knowing and memorizing. This exam measures how much long-term information you've managed to absorb from our lectures. Remember, when a certain topic or idea is unclear to you, always ask your instructor/teacher to clarify the thought.


Hands-On ( will be considered as your Third LE )
Open everything but no communicating with anyone except with me. Brace yourselves.
Review or study how to find solutions to linear systems using matrices.
Tignan na lang natin.. magaral muna kayo for the written exam.


MAG-ARAL KAYO! TODO NIYO NA! \m/(^___^) V

Errata: 14 - Multidimensional Arrays

  1. @Slide 2: declaration should be int a[3][4]; to be consistent with the table.
  2. @Slide 6: "Indeces should be from 0 to sizei-1, i = 1, 2, .., N, for all N dimensions." The original statement might mislead you in thinking that all dimension sizes are N. This statement expresses the thought more clearly.
Thanks!

Monday, September 7, 2009

ME 15 - Matrix Product/Multiplication

I am assuming that you already know what matrices are and the basic operations that can be applied to them. You can just Google it, anyways ^_^v.

For our last Machine Exercise, create a function that multiplies two matrices A and B and puts the result in matrix C, with the following prototype:

void mat_mul( int A[][MAX_COL], int B[][MAX_COL], int C[MAX_COL], int rowA, int colA, int colB );

Remember that multiplying an m x n matrix by an n x p matrix yields an m x p matrix.

Good luck!

Monday, July 20, 2009

First LE

Exam Coverage
  • From the beginning to for loop.

Exam Type
  • Identification
  • Writing C statements
  • Programming (Flowchart + C Coding)
  • Debugging
Hi Guys and Gals! Dagdag ko lang itong slide na hindi ko pa na upload. Good luck!

Data Into Information

Sunday, July 12, 2009

Source Code Editors for Windows

If you have managed to install MinGW using the instructions on my last post, you must be wondering what text editor you may use. In its purest sense, you can use any text editor like notepad. Just save your source files with the .c file extension.

But the thing is, notepad lacks that token coloring scheme and line numbering we see when we use gedit in linux (ubuntu). Fortunately, there are a number of free and open source text editors around. The following are just two:
  1. Crimson Editor is a freeware source code editor for Windows. Click here to visist its official site.
  2. Notepad++ is also a relatively well-known source code editor. Unlike the latter, Notepad++ is not only free but is also open-source. Meaning, people may download and edit its source code legally. Click here for its offical site.

Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it.

- Brian Kernighan

C Compilers for Windows

MinGW or Minimalist GNU for Windows
This is the gcc port to Windows we use in class.
  1. Click here to download MinGW-5.1.4.exe
  2. Run the program.
  3. Download and Install.
  4. Don't change anything.
  5. The default installation directory, as pre-configured within the installer, is C:\MinGW. Unless you are very sure you know what you are doing, you should not change this; in particular: never install MinGW into any directory which includes spaces in its absolute path name. - from the official guide
  6. Change the Environment Settings using the instructions below excerpted from the official guide
  7. Run command prompt by going to Start->Run.. and typing cmd then enter (in Vista, you can immediately type cmd in the Start Search area). Locate your source code by jumping through files using the cd or change directory command like what we do in class. Type cd .. if you want to go back to the parent folder relative to your current location.
  8. Use dir instead of ls to list the files and directories in your current location (or directory)
  9. Make sure that your source code is inside your current directory.
  10. Compile your source code, for example hello.c by entering the command gcc hello.c -o hello
  11. You will notice that a new file hello.exe is created. Note that by default, if you do not type any file extension, the executable file will end in .exe. Though you can explicitly specify the file extension.
  12. Execute your compiled program by inputting the command hello.exe or just hello (for .exe files only). No need to prefix ./
Environment Settings

When you install command line tools, such as MinGW, or GnuWin32 tools, you have to tell the command line interpreter where to find them; this is usually accomplished by adding the appropriate directory names to the PATH variable in your environment. Typically, it is your responsibility to do this; please do not expect the installer, (if you used one), to do it for you.

Warning: Adding entries to the PATH is normally benign. However, if you delete, you may mess up your PATH string, and you could seriously compromise the functioning of your computer. Please be careful.

  1. Right-click on "My Computer" and select "Properties".
  2. Click Advanced -> Environment Variables.
  3. In the box entitled "System Variables" scroll down to the line that says "PATH" and double-click the entry.
  4. You will be presented with a dialog box with two text boxes, the bottom text box allows you to edit the PATH variable. It is very important that you do not delete the existing values in the PATH string, this will cause all sorts of problems for you!
  5. Scroll to the end of the string and at the end add ";\bin". Here is the full absolute path name of the installation directory; if you accepted the defaults when installing tar and gzip, then for these, it will (probably) be C:\Program Files\GnuWin32, while for MinGW it will be C:\MinGW\bin, (if you kept to the recommended default installation directory). Don't forget the semicolon; this separates the entries in the PATH.
  6. press OK -> OK -> OK and you are done.

Turbo C
  • You can check here for a relatively detailed instruction on how to install Turbo C. I think you need a floppy disk but a flash disk might work as well. Anyways, I am not a fan of Borland and I did not even try to install this on my system.


Dev-C++ and wxDev-C++
The latter is a somehow newer version of the former. Both are IDEs or Integrated Development Environments bundled with MinGW. Basically, Editor+Compiler in one package.
  • Click here to download the 'latest' version of Dev-C++ or here for the official site.
  • Click here to download the latest stable version of wxDev-C++ or here for the official site.


Be ready for your first programming project.

Tuesday, July 7, 2009

Notes 2

Errata:
Slide 35 - "scanf() – general-purpose output routine."

05 ES26 Lab - Data Types