Sunday, September 25, 2011

Guia de utilização do Octave da Professora Aline (FMU/FISP)

Seguem aqui o tutorial da professora Aline da FMU/FISP, um guia de utilização do programa Octave, uma versão free do caríssimo e famoso Matlab:

Parte 1:


Parte 2:



Parte 3: 


Agora preciso estudar, tem prova dela e mais uma outra este semana.

Abraços!

Experiencing Gravity Differently / Bungee Jumping

Last weekend I participated in a sports event here in Sao Paulo, Brazil. I was invited by a friend, one of the organizers of the event, to be a guest and the first in the bungee jumping section.

Never had I seen such a thing closely before, I was the first of the day to jump, thus I felt like a guinea pig on that day.

It was 43m high, approximately a 16 floor building, and naturally, it was pretty scaring. While being elevated, the heart gets accelerated, I tried to avoid looking around, in order to keep calmer. The hardest part undoubtedly was to take the decision, to either jump or stay. The is certainly the most critical part, that is the time you can verify if you've got the guts or not.

I was wearing a t-shirt depicting the Super Saiyan Vegeta, that was a courage charm for me, in a bid to encourage me greatly to do that, and it seems that it worked out.

The free fall lasts roughly between 1 second and a half to 2 seconds, I reckon. After that, you're brought back and forth, up and down, right to left, by that rope that you have to fully trust.

Well, the bottom line conclusion I came to after that unusual scaring experience is, fear is really something psychological. Some moments before jumping I could clearly feel fear coming all over me, and intelligently, I noticed that such a thing was optional, I could either let it take control of me, or else, get rid of it by emptying my mind. The point is, keep your mind void, don't think. If you begin thinking about what you're about to do and all conceivable outcomes, you probably won't jump.

Is there an indication that feelings can really be controlled? Ah man, I've always believed that, when we are seriously determined to do it, we can, we can put intelligence over feelings, and naturally, that can be extended to feelings like love and hate. Mind can control feelings, there are times reasoning must beat emotions, and with will-power, determination, we can achieve it.

In the end, that jump was useful for the realization that we can handle self control, mind can control emotions, and we surprise ourselves by see us doing the unconceivable, overcoming our limitations and achieving a new perspective of our own selves. We got the power LOL!!!
Now the videos:

1) This one is my jump being entirely shot, initially by me, while being lifted and the moments before the jump. Later then, my friend Denis, the Japanese guy, shooting my whole fall:

2) The jump of the second guy (I was the first), shot from the floor. He was reluctant (I understand him), but he eventually jumped:


3) Another guy being shot from the floor, this one did it with much courage:

I hope you'll enjoy the videos, comments are welcome, cheers from Brazil!

Sunday, September 11, 2011

Relação entre determinante de matriz e o resultado da discussão de suas equações lineares

Esta postagem é mais um lembrete importante.

Para quem não se lembra, discutir um sistema linear (um conjunto formado por equações lineares que pode ser expresso na forma de matriz) significa classificá-lo da seguinte maneira:

- Compatível (ou Possível)
    - Determinado => formado por uma solução única
    - Indeterminado => formado por infinitas soluções

- Incompatível (ou Impossível) => não tem solução

O resultado classificatório acima está diretamente ligado com o determinante da matriz formada pelas equações lineares, o que é o foco desta postagem. A relação é a seguinte:

- Det ≠ 0 => Sistema Compatível e Determinado
- Det = 0
    - Se o determinante de algumas das incógnitas for diferente de 0, o sistema é Impossível
    - Se todos os determinantes da incógnitas forem nulos, o sistema, se tiver solução, será indeterminado

Um último lembrete importante é:

As colunas (ou linhas) de um sistema linear (podendo ser expresso na forma de matriz) podem também ser tratados como vetores, os vetores colunas (ou linhas). Tais vetores podem ou não ser linearmente independentes entre si. Apenas relembrando, vetores linearmente independentes formam uma base, uma base com a qual é possível escrever vetores através da combinação linear de seus vetores componentes. Um exemplo claro disso é o tradicional eixo cartesiano com 2 eixos (ou 3 ou mais). Os vetores unitários das posições x, y e z, ou seja, i, j e k, podem ser combinados para expressar qualquer vetor nesta base, sendo a base a expressão das componentes dos vetores em questão.

A determinação de um conjunto de vetores como sendo linearmente dependentes ou independentes está também ligado aos determinantes, da seguinte maneira:

- Det = 0 => dependência linear
- Det ≠ 0 => independência linear

Assim sendo, ao tratar um conjunto de vetores matricialmente e calculando o respectivo determinante, é possível saber se os vetores envolvidos formam uma base para a geração de outros vetores, assim como saber a natureza do sistema linear correspondente, o resultado de sua discussão.

Abraços!

Saturday, September 10, 2011

The Best Java Web Framework

10 Best Java Web Development Framework

There are a majority of enterprises running Java applications and working on Java web development framework. What remains to be seen is that a number of companies are tied to the conventional web development framework and haven’t actually started to anticipate what could be the best Java web development framework. Even the JavaOne might hold no unified voice for what web framework is best. There are several easy to use Java web frameworks that are out now a days, and they are too many. Essentially choosing the best web development framework has become more intricate, specifically due to three reasons. On a broader perspective, the web technology landscape has undergone a sea change; far more choice of technology; and changing requirements for modern web applications. After an extensive research we assorted the 10 best Java web development framework that we would like to share with you.

1. Struts 2

Apache Struts 2 is an enterprise-ready web framework for Java application. It has been designed to streamline the entire development cycle starting from building to deploying. Struts 2 is a combined effort of WebWork and Struts communities. Unlike conventional web applications, it can create dynamic responses. Struts 2 comes with an improved design with clean code for HTTP-independent framework interfaces. Added interactivity and flexibility with AJAX tags gives the look and feel just like standard Struts tags. It doesn’t use Action forms, instead Struts 2 uses JavaBean to capture form input or put properties directly on an Action class. POJO Actions enables class to used as an action class with optional interface. Plugin APIs for the framework include config browser, JasperReports, JavaServer Faces, Pell Multipart, Plexus, sitegraph, sitemesh, tiles and Struts 1. The framework essentially requires Servlet API 2.4, JSP API 2.0 and Java 5.
Struts 2 could be a great option for small teams looking to learn about the open source tools they use. It’s not for armchair programmers looking for drag and drop development.
Link

2. JSF

JavaServer Faces (JSF) is a java web application framework established the standard for development of server-side user interfaces for Java EE application. The JSF APIs are designed to leverage tools that would make we application development increasingly easier. It uses a component based approach. JSF uses JavaServer Pages JSP as its display technology, but it can also support other technologies such as XUL and Facelets . The UI is saved on clients request for new page and restored when the response is returned.
JSF has a set of API for representing user interface components and manages their state, converting values, input validation and event handling, defining page navigation and support for accessibility and internationalization. It has two JavaServer Pages (JSP) custom tag libraries for expressing a JavaServer Faces interface within a JSP page. Some of its key features include server-side event model, state management, JavaBeans with dependency injection and Unified Expression Language for both JSP 2.0 and JSF 1.2. JSF 2.0 offers improved support for Ajax by allowing UI logic to run partly on the client and not on the server.
For the latest, in the public draft for JEE6, Facelets would be adopted as the official view technology for JSF 2.0. This would resolve the life-cycle conflicts with JSP that forced developers to go for workarounds.
    Pros
  • Java EE standard with lots of demand and jobs
  • Initially was fast and easy to develop
  • Loads of component libraries
    Cons
  • Tag soup for JSPs
  • Lacks unified source for implementation
  • Doesn’t support REST or Security well

3. Spring MVC

It is a layered Java/J2EE framework integrating a number of different technologies and is applicable to wide range of projects. Spring is based on code published in Expert One-on-One J2EE Design and Development. Spring clearly separates business, navigation and presentation logic. It is a proven web mechanism constructed with a clean web tier. Spring MVC allows users to use any object as a command or form object – there is no need to implement a framework-specific interface or base class. Spring’s features a highly flexible data binding. MVC Model and VIew is based on the map interface that is highly configurable, either via bean names, via a properties file, or via your own ViewResolver implementation. Spring supports controller as an optional command or form object. It has an extremely flexible view resolution that can even write a view directly to the response.
It should be considered a strategic base platform for web application development.
Link

4. Wicket

Apache Wicket is a lightweight component based web application framework for the Java programming language. Wicket is patterned after stateful GUI frameworks. It features trees of components that use listener delegates to react to HTTP requests against links and forms. With XHTML for templates it separate presentation and business logic and allows templates to be edited with conventional WYSIWYG design tools. Within the framework each component is backed by its own model that represents the state of the components. Wicket might be the best framework for making use of your developers resources.
Link

5. Stripes

The web framework offers a lot of complex data interactions. It offers powerful type conversion, binding and validation. Stripes has been designed to manage large, complex forms and maps them directly to objects etc. Stripes requires zero external configuration beyond the registration of one servlet and one filter. Most importantly, Stripes provides simple and effective solution to common problems such as indexed properties, multi-event forms, localization and use of domain objects in the web tier. It is a compact web development framework with just few dependencies.
Link

6. Tapestry

It is an object oriented powerful, open-source, all-Java framework for creating leading edge web applications in Java. The framework allows implementation of applications according to the model-view-controller design pattern. Tapestry offers an innovative web application development concept in terms of objects, methods and properties instead of URLs and query parameters. It adopts a modular approach to web development by combining user interface components (objects) on the web page and their corresponding Java classes.
It could be a rescue for those looking to avoid scripting environments such as JavaServer Pages or Velocity. It provides a complete framework for creating extremely dynamic applications with minimal amounts of coding. The web development framework focuses on simplicity, ease of use, and relieves programmers from creating enormous block codes.
For the latest Tapestry offers a new approach with an entirely new code base, centered on Plain Old Java Objects, annotations and naming conventions, and runtime bytecode enhancement.
Link

7 . RIFE

This is a unique framework for web development and design with tools and APIs to implement commonly used web features. It has been designed for separating tasks during a development cycle, ensuring that each developer or designer focuses on his own tasks. If needed the any work can be effortlessly integrated with the work of the rest of the team. RIFE’s has a number of independently usable toolkits, which can be integrated to boost productivity. All the declaration and definitions in RIFE is handled in one place in the code. This makes it easy for the developers to reduce code replication, enforce consistency, and ease the maintenance. This results in a loosely coupled and very robust system.
It combines the best of request based and component approach to offer consistent component based object model. RIFE’s design provides the best of request-based and component-based approaches and blends them together in a consistent component object model. The web engine provides a solution that values maintainability without compromising on productivity. Through a centralized site structure, an application can be split up into easily reusable binary modules that can be seamlessly integrated into other projects. There is a wide scope for incremental improvements with little or no risk of unwanted anomalies in the system.
Link

8. Seam

It’s a powerful open source web application framework developed by JBoss. Seam offers a perfect platform for building rich Internet applications in Java. It is a unified full-stack solution that integrates technologies such as Ajax, JavaServer Faces (JSF), Java Persistence (JPA), Enterprise Java Beans (EJB 3.0) and Business Process Management (BPM) into tooling. Seam also expands the concept of contexts. All the Seam component are enclosed within a context. The default Seam context is conversation which can span multiple pages and usually spans the whole business flow, from start to finish. All the actions in a session context is captured until the user logs out or closes the browser. WYSIWYG development in Seam is facilitated through the use of JBoss Tools.
Seam overcomes design issues by eliminating both eliminate complexity at both architecture and API levels. It enables developers to assemble complex web applications using simple annotated Java classes, a rich set of UI components, and XML in parts. Above all, it offers outstanding support for conversations and declarative state management that can introduce a more sophisticated user experience. At the same time it eliminates the common bugs found in traditional web applications.
Exceptionally, Seam features a PDF document creator, e-mailing, graph creation and creation of Microsoft Excel worksheets.
Link

9. Google Web Toolkit (GWT)

GWT is a Java software development framework that allows web developers to build and maintain complex Javascript front-end applications in Java. The web development framework makes it easy for developers to write AJAX applications like Google Maps and Gmail. Other than a few native libraries, everything is Java source that can be built on any supported platform with the included GWT Ant build files. GWT focuses on reusable, efficient solutions for asynchronous remote procedure calls, Internationalization, history management, bookmarking and cross-browser portability. It allows developers to develop and debug AJAX applications in the Java language with any Java development tools of their choice. However, due to lack of modularity in JavaScript, sharing, testing, and reusing AJAX components becomes a hassle.
Link

10 . OpenXava

It is a web development framework for creating Ajax Enterprise applications with Java. OpenXava has been designed by Java developers looking for a productive Java Enterprise applications. In OpenXava developers have to provide only the JPA classes to obtain a full featured application ready for production. It requires no code generation. It allows rapid and easy generation of CRUD modules and report generation. It also allows the flexibility to develop complex real life business applications as customer relationship, invoicing, accounting packages, warehouse management, etc. It The web framework offers full Ajax support and can be used on application server (Tomcat, JBoss, WebSphere, etc).
It is a faster framework than Ruby On Rails, Spring MVC, or any other MVC framework.
Link

==========================================

I obtained this list at http://lilylnx.wordpress.com/2010/05/19/10-best-java-web-development-framework/

==========================================

If you want a full comparison between the existing web application frameworks out there, including tons of programming languages, you'd better take a look at the following link, it is amazing the amount of detail:

http://en.wikipedia.org/wiki/Comparison_of_Web_application_frameworks

==========================================

Cheers!

Sunday, September 4, 2011

Dificuldades em produzir um algoritmo em Portugol ou Português Estruturado



Olha, segue aqui a minha opinião quanto ao assunto...

Em quase todos os cursos que fazemos da área de Tecnologia da Informação, nós somos apresentados a tal técnica que é dita ser preliminar à programação, uma codificação genérica que serve para qualquer linguagem, pois é não é dependente de uma linguagem em específico.

Sinceramente, na minha opinião, o tal do Português estruturado deve ser bom demais para linguagens da época do onça, coisas antigas como C, Pascal, Clipper, etc. Contudo, do Java pra cá, ainda mais agora com o .NET da Microsoft forte no mercado com as linguagens C# e VB.NET, Delphi, C++, etc., linguagens onde temos um aparato enorme de recursos para programar através de bibliotecas e assistentes (wizards), eu não vejo o Português estruturado como uma coisa pertinente, e vou dizer o porquê na minha ótica.

Como toda linguagem, o Português Estruturado possui sua própria sintaxe, com instruções genéricas que são escritas de forma específica dentro do universo de cada linguagem. Eu vejo que o universo de sintaxe do Português Estruturado é algo tão simplório que atende apenas as linguagens muito antigas acima mencionadas. Como exemplo, eu cito:

Como fazer para computar o tamanho de uma string de caracteres em C (antigo) e em Java (mais moderno) por exemplo?

Em Java, nós temos uma função (método) criada para isso, de forma que o desenvolvedor simplesmente pegue-a e a utilize, obtendo como retorno o valor inteiro do tamanho da string, coisas do tipo:

size();
length();

Em C, mesmo que este exemplo não seja o mais apropriado, o que quero dizer é que a linguagem não dispõem de tantos recursos já prontos, sendo que teríamos que inventar o nosso próprio método de obter o tamanho de uma string, dentre outras coisas.

Java contém um tipo de dado chamado String, ao passo que C trata strings como arrays do tipo “char”, o que é uma das diferenças.
Voltando ao Português Estruturado, sua sintaxe permite fazer o que hoje pode ser chamado como reinventar a roda, escrever códigos estilo linguagem C ou Pascal para a obtenção do que queremos. Contudo, com o que dentro do Português Estruturado nós podemos chamar uma rotina do tipo size() ou length() do Java ou do C#, por exemplo?

Quem programa com linguagens modernas não codifica dentro do universo do Portugol, sua sintaxe é obsoleta para as linguagens atuais, que diferentemente da época do C e do Pascal onde a programação era estrutural, hoje o paradigma mais utilizado é a Orientação a Objeto, algo importantíssimo e que introduz uma nova maneira de tratar as coisas, através de Classes, Objetos, Herança, Encapsulamento, Polimorfismo, etc. coisas que o Português Estrutural nem sonha.

Resumindo, querer criar um algoritmo em Portugol hoje em dia e na sequência tentar implementar um programa com ele, com uma linguagem moderna, significa jogar fora toda a API de programação moderna e sair reinventando a roda, programando dentro do ambiente .NET no estilo linguagem C, por exemplo, o que praticamente ninguém deve fazer no mundo, ninguém vai desprezar a Orientação a Objeto, coisas que o Java e o .NET nem permitem realizar pra se ter uma idéia.

Senti tal dificuldade ao tentar criar um algoritmo para a conversão de números Binários para Decimal, onde senti na pele a limitação de não poder chamar um método length() para determinar o tamanho de uma String, e sim ter que criar o método do zero (reinventar a roda) como seria feito em linguagens mais antigas. Confesso que desisti da tentativa, embora o programa em Java saiu e está postado antes deste texto (em Inglês), onde ainda fiz o possível para não utilizar Orientação a Objetos, tentando simplificar as coisas.

Na vida real, no mercado de trabalho, em anos, nunca vi ninguém criando Português Estruturado antes de sair programando. O que se costuma fazer é a criação de um diagrama de classes (recurso da Orientação Objeto), e não há nem tempo para se aventurar em como utilizar um recurso tão antigo para dificultar no desenvolvimento de aplicativos comerciais dos dias de hoje.

Apesar de tudo, vejo o Portugol como um recurso excelente para desenvolvimento de lógica de programação, desde que o mesmo código genérico seja implementado em uma linguagem como o C, pois seria um treinamento grandioso sobre como fazer as coisas da forma mais complexa (hoje em dia tudo está mais simplificado). Isso ajuda no raciocínio lógico, mas ao mesmo tempo, é algo que não se usa no mercado de trabalho ao lado da modernidade do mundo do desenvolvimento de software.

Para terminar, deixo a pergunta no ar, até que ponto vale a pena aprender isso na faculdade? Não é melhor ensinar Orientação a Objeto e coisas realmente utilizadas no mercado do século XXI?

Código em Português Estruturado que parei no meio frente às dificuldades acima explicitadas:

programa CONVERSAO_PARA_DECIMAL

var
      numeroBinario: string
      numeroCaracteres, potenciaMaxima: inteiro
      arrayCaracteres: conjunto[] de caracteres
      array Strings: conjunto[] de strings
      arrayInteiro: conjunto[] de inteiros
      potenciaDigitos: conjunto[] de inteiros

inicio

escreva “Qual o numero binário a ser convertido?”
leia numeroBinario

numeroCaracteres = tamanho_numeroBinario;
potenciaMaxima = numeroCaracteres - 1;

var i: inteiro
para i de 0 até numeroCaracteres passo 1 faça
      se (numeroBinario <> 0 E numeroBinario <> 1)
            escreva “Você não inseriu um número binário”
            fim
      fim_se
fim_para

para i de 0 até numeroCaracteres passo 1 faça
      arrayCaracteres[i] =

Razão: há coisas que não dá para serem expressas em Português Estruturado, ao menos que você esteja disposto a desenvolver as coisas com as “facilidades” dos anos 80 e início dos 90.

Quem quiser o código do programa em Java, basta ler a postagem imediatamente anterior a esta.

Fica aí minha opinião,

Abraços!

Simple Java program to convert Binary numbers to Decimal ones

Despite the simplicity of the code, it took me a couple of hours to workaround some characteristics of of the Java language that were not for me, they were playing against me. Never had I struggled too much to simply convert characters to integers, my goodness!!! That was supposed to be a piece of cake, but after lots of different tries, and frustrating ones since that was supposed to be too easy to be true, I eventually circumvented the problem using arrays of types Integer, Character and String. Enough, I don't want to remember that again, so let's go to the code:

===============================================


package com.silvestri.bin.to.dec;

import javax.swing.JOptionPane;

public class DecimalConverter {

public static void main(String[] args) {
String binaryNumber;
int numberOfCharacters;
int maximumPower;
binaryNumber = JOptionPane.showInputDialog(null, "What's the Binary number to be converted? ");
 
for (int i = 0; i < binaryNumber.length(); i++) {
if (binaryNumber.charAt(i) != '0' && binaryNumber.charAt(i) != '1') {
JOptionPane.showMessageDialog(null, "You haven't input a binary number");
  return;
}
}
 
numberOfCharacters = binaryNumber.length();
maximumPower = numberOfCharacters - 1;
Character[] charArray = new Character[numberOfCharacters];
String[] stringArray = new String[numberOfCharacters];
Integer[] intArray = new Integer[numberOfCharacters];
 
Integer[] poweredDigits = new Integer[numberOfCharacters];
 
for (int i = 0; i < numberOfCharacters; i++) {
charArray[i] = binaryNumber.charAt(i);
stringArray[i] = charArray[i].toString();
intArray[i] = Integer.parseInt(stringArray[i]);

}

for (int i = 0; i < intArray.length; i++, maximumPower--)
poweredDigits[i] = (int)(Math.pow(2, maximumPower)) * ((intArray[i]));
 
int sum = 0;
for (int i = 0; i < intArray.length; i++)
sum += poweredDigits[i];

JOptionPane.showMessageDialog(null, "The equivalent Decimal number is: " + sum);

}

}

===============================================

Some may come and tell "there's a much simpler way to convert that," such as in the example below:

-------------------------------------------------------------------------------------

import java.io.BufferedReader;
import java.io.InputStreamReader;
public class BinarytoDecimal {

    public static void main(String[] args) throws Exception {
       BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        System.out.println("Enter the binary value:");
         String s = br.readLine();
        System.out.println("Decimal value is : "+Integer.parseInt(s, 2));

    }
}

found at: http://www.roseindia.net/java/java-get-example/java-binary-decimal.shtml

-------------------------------------------------------------------------------------

To those ones I tell that I wanted to convert the number myself, not ask for the Java Virtual Machine to do it for me. I was also considering writing that problem in C in order not to count on some of the facilities of the Java language, who knows I go for it at another opportunity...

I'm running out of time now, lots of things to do, I hope you appreciate the code, see you later!!!

Using Slope and y-Intercept to Graph Lines

I KNOW, I NEED TO WORK ON THIS POST TO FIX IT, AS SOON AS I CAN :)


Hello folks!!!


Here comes the best and the more simplistic though useful explanation about the equation of straight lines in Analytic Geometry, found at the web site Purple Math. I thought I should share it with all of you:


====================================================================


Given two points (x1y1) and (x2y2), the formula for the slope of the straight line going through these two points is:
    slope formula: m = [y1 - y2] / [x1 - x2]
...where the subscripts merely indicate that you have a "first" point (whose coordinates are subscripted with a "1") and a "second" point (whose coordinates are subscripted with a "2"); that is, the subscripts indicate nothing more than the fact that you have two points to work with. Note that the point you pick as the "first" one is irrelevant; if you pick the other point to be "first", then you get the same value for the slope:
    m = (y2 - y1) / (x2 - x1)
(If you're not sure that the two formulas above give exactly the same values, no matter the pair of points plugged into them, then pick some points and try them out. See what you get.)
The formula for slope is sometimes referred to as "rise over run", because the fraction consists of the "rise" (the change in y, going up or down) divided by the "run" (the change in x, going from left to the right). If you've ever done roofing, built a staircase, graded landscaping, or installed gutters or outflow piping, you've probably encountered this "rise over run" concept. The point is that slope tells you how much y is changing for every so much that x is changing. Pictures can be helpful, so let's look at the line y = ( 2/3 )x – 4; we'll compute the slope, and draw the line.
To find points from the line equation, we have to pick values for one of the variables, and then compute the corresponding value of the other variable. If, say, x = –3, then y = ( 2/3 )(–3) – 4 = –2 – 4 = –6, so the point (–3, –6) is on the line. If x = 0, then y = ( 2/3 )(0) – 4 = 0 – 4 = –4, so the point (0, –4)is on the line. Now that we have two points on the line, we can find the slope of that line from the slope formula:
    slope m = 2/3

Let's look at these two points on the graph:
Copyright © Elizabeth Stapel 2000-2011 All Rights Reserved
  plotted points, with line drawn through
   

In stair-stepping up from the first point to the second point, our "path" can be viewed as forming a right triangle:
  'up two, over three'
   
The distance between the y-values of the two points (that is, the height of the triangle) is the "y2 – y1" part of the slope formula. The distance between the x-values (that is, the length of the triangle) is the "x2 – x1" part of the slope formula. Note that the slope is 2/3, or "two over three". To go from the first point to the second, we went "two up and three over". This relationship between the slope of a line and pairs of points on that line is always true.

To get to the "next" point, we can go up another two (to y = –2), and over to the right another three (to x = 3):

With these three points, we can graph the liney = ( 2/3 )x – 4.
  another 'up two, over three'
(If you're not sure of that last point, then put 3 in for x, and verify that you get –2 for y.)

Let's try another line equation: y = –2x + 3. We've learned that the number on x is the slope, so m
= –2
 for this line. If, say, x = 0, then y = –2(0) + 3 = 0 + 3 = 3. Then the point (0, 3) is on the line. With this information, we can find more points on the line. First, though, you might want to convert the slope value to fractional form, so you can more easily do the "up and over" thing. Any number is a fraction if you put it over "1", so, in this case, it is more useful to say that the slope is m =  –2/1. That means that we will be going "down two and over one" for each new point.

We'll start at the point we found above, and then go down two and over one to get to the next point:
  'down two, over one'
   
   
Go down another two, and over another one, to get to the "next" point on y = –2x + 3:
  another 'down two, over one'
Then the point (2, –1) is also on this line; with three points, we can graph the line.



Given a point on the line, you can use the slope to get to the "next" point by counting "so many up or down, and then so many over to the right". But how do you find your first point? Take a look back at thegraph of the first line and its equation: y = ( 2/3 )x – 4 crossed the y-axis at y = –4, so the equation gave us the y-intercept. The second line did too: the graph of y = –2x + 3 crossed the y-axis at y = 3. This relationship always holds true: in y = mx + b, "b" gives the y-intercept, and "m" is the slope. We can use this fact to easily graph straight lines:
  • Graph the equation y = ( 3/5 x – 2 from the slope and y-intercept.
  • From the equation, I know that the slope is m = 3/5, and that the line crosses the y-axis aty = –2. Copyright © Elizabeth Stapel 2000-2011 All Rights Reserved

    I'll start by plotting this first point:
      y-intercept at y = -2
       

    From this point, I go up three and over five:
      'up two and over three' to get the second point
       

    Then I go up another three and over another five to get my third point:
      another 'up three and over five' to get the third point
       

    With three points, I can draw my line:
      graph of y = (3/5)x - 2
As a stylistic note, you should probably pencil in the "up and over", if you are using this technique for graphing your straight line. That way, your instructor will know where your points came from. Also, if you are going to graph this way (instead of doing a T-chart of points), you will need to do your graph very neatly. If your scale on your axis is at all inconsistent or if your axes are at all crooked, this method will not work!


====================================================================


My comments:
----------------------------------------------


I don't think my first explanation of the subject was bad at all back to 1999, but this one is so concise and yet useful, it's crystal clear to me and served as a nice review on the subject. Thanks Purple Math!


----------------------------------------------


Source: http://www.purplemath.com/modules/slopgrph.htm