general

Top 10 things

1. Talent is one-third of the success equation.

Talent is important in any profession, but it is no guarantee of success. Hard work and luck are equally important. Hard work means self-discipline and sacrifice. Luck means, among other things, access to power, whether it is social contacts or money or timing. In fact, if you are not very talented, you can still succeed by emphasizing the other two. If you think I am wrong, just look around.

2. 95 percent of any creative profession is shit work.

Only 5 percent is actually, in some simplistic way, fun. In school that is what you focus on; it is 100 percent fun. Tick-tock. In real life, most of the time there is paper work, drafting boring stuff, fact-checking, negotiating, selling, collecting money, paying taxes, and so forth. If you don’t learn to love the boring, aggravating, and stupid parts of your profession and perform them with diligence and care, you will never succeed.

3. If everything is equally important, then nothing is very important.

You hear a lot about details, from “Don’t sweat the details” to “God is in the details.” Both are true, but with a very important explanation: hierarchy. You must decide what is important, and then attend to it first and foremost. Everything is important, yes. But not everything is equally important. A very successful real estate person taught me this. He told me, “Watch King Rat. You’ll get it.”

4. Don’t over-think a problem.

One time when I was in graduate school, the late, great Steven Izenour said to me, after only a week or so into a ten-week problem, “OK, you solved it. Now draw it up.” Every other critic I ever had always tried to complicate and prolong a problem when, in fact, it had already been solved. Designers are obsessive by nature. This was a revelation. Sometimes you just hit it. The thing is done. Move on.

5. Start with what you know; then remove the unknowns.

In design this means “draw what you know.” Start by putting down what you already know and already understand. If you are designing a chair, for example, you know that humans are of predictable height. The seat height, the angle of repose, and the loading requirements can at least be approximated. So draw them. Most students panic when faced with something they do not know and cannot control. Forget about it. Begin at the beginning. Then work on each unknown, solving and removing them one at a time. It is the most important rule of design. In Zen it is expressed as “Be where you are.” It works.

6. Don’t forget your goal.

Definition of a fanatic: Someone who redoubles his effort after forgetting his goal. Students and young designers often approach a problem with insight and brilliance, and subsequently let it slip away in confusion, fear and wasted effort. They forget their goals, and make up new ones as they go along. Original thought is a kind of gift from the gods. Artists know this. “Hold the moment,” they say. “Honor it.” Get your idea down on a slip of paper and tape it up in front of you.

7. When you throw your weight around, you usually fall off balance.

Overconfidence is as bad as no confidence. Be humble in approaching problems. Realize and accept your ignorance, then work diligently to educate yourself out of it. Ask questions. Power – the power to create things and impose them on the world – is a privilege. Do not abuse it, do not underestimate its difficulty, or it will come around and bite you on the ass. The great Karmic wheel, however slowly, turns.

8. The road to hell is paved with good intentions; or, no good deed goes unpunished.

The world is not set up to facilitate the best any more than it is set up to facilitate the worst. It doesn’t depend on brilliance or innovation because if it did, the system would be unpredictable. It requires averages and predictables. So, good deeds and brilliant ideas go against the grain of the social contract almost by definition. They will be challenged and will require enormous effort to succeed. Most fail. Expect to work hard, expect to fail a few times, and expect to be rejected. Our work is like martial arts or military strategy: Never underestimate your opponent. If you believe in excellence, your opponent will pretty much be everything.

9. It all comes down to output.

No matter how cool your computer rendering is, no matter how brilliant your essay is, no matter how fabulous your whatever is, if you can’t output it, distribute it, and make it known, it basically doesn’t exist. Orient yourself to output. Schedule output. Output, output, output. Show Me The Output.

10. The rest of the world counts.

If you hope to accomplish anything, you will inevitably need all of the people you hated in high school. I once attended a very prestigious design school where the idea was “If you are here, you are so important, the rest of the world doesn’t count.” Not a single person from that school that I know of has ever been really successful outside of school. In fact, most are the kind of mid-level management drones and hacks they so despised as students. A suit does not make you a genius. No matter how good your design is, somebody has to construct or manufacture it. Somebody has to insure it. Somebody has to buy it. Respect those people. You need them. Big time.

Standard
technology

Password Protecting Your Website

Below are simple instructions to password protecting a website. While not the most secure means of password protection, this method provides reasonable security for files such as course materials. You may wish to print these instructions for easy reference since you will be working with three programs: your browser (e.g. Internet Explorer), Notepad, and FrontPage.

Here is an example of what you are going to create.

Follow these steps to create your own password protection.

  1. Open Notepad [generally found under Start button/Accessories in a Windows PC environment].
  2. Returning to your browser window, Select and Copy the information below:<HTML>
    <body>
    <SCRIPT>
    function passWord() {
    var testV = 1;
    var pass1 = prompt(‘Please Enter Your Password’,’ ‘);
    while (testV < 3) {
    if (!pass1)
    history.go(-1);
    if (pass1.toLowerCase() == “cucumber“) {
    alert(‘You Got it Right!’);
    window.open(‘index.htm‘);
    break;
    }
    testV+=1;
    var pass1 =
    prompt(‘Access Denied – Password Incorrect, Please Try Again.’,’Password’);
    }
    if (pass1.toLowerCase()!=”password” & testV ==3)
    history.go(-1);
    return ” “;
    }
    </SCRIPT>
    <CENTER>
    <FORM>
    <input type=”button” value=”Enter Protected Area” onClick=”passWord()”>
    </FORM>
    </CENTER></body></HTML>
  3. Returning to Notepad, paste the copied text into the window.
  4. Delete the password cucumber in line 10 (highlighted in yellow above) and replace it with one of your own.
  5. Likewise, change the highlighted target page filename in line 12, index.htm, to the filename of the web page you wish to password protect. [Always delete carefully — leave all other characters, including the single quote marks, which will enclose your new password. If your initial attempt to use a password fails, carefully compare your edited code lines to the original lines of source code to check for accidental deletions, add what is missing, and try again.]
  6. Save this Notepad document in your web site’s folder, but save it as an html file by adding .htm or .html to the filename, instead of .txt (e.g. code.htm).
  7. Open Microsoft FrontPage. [If a blank page does not automatically open, click on New under the File menu, and select Page or Blank Page, depending on your version of FrontPage.]
  8. Select Save As under the File menu; when the Save As box appears, select your web site folder from the drop-down Save-In menu.
  9. Name the file by typing a short but descriptive title in the File name box. [If you use more than one word for your file name, use underscores instead of spaces (example: art_index). FrontPage will supply the .htm extension to the filename, so that the example becomes art_index.htm.]
  10. Save the file.
  11. Select the HTML button located near the bottom of the screen.
  12. Delete all the code text in the HTML view.
  13. Returning to your Notepad document, Select and Copy the entire text of your Notepad document.
  14. Returning to the blank FrontPage html view, Paste this text into the blank HTML view.
  15. Save the new page.
  16. Return to Normal FrontPage view [use button preceding HTML at bottom]. You will see a button that reads “Enter Protected Area.”
  17. Begin customizing your page.
Standard
java

Learning Java in stages

Hi, while surfing through the net I found this very interesting article..

This page is in response to questions like this one:

Hi. I’m writing a JSP which talks to a database using JDBC, then responds with XML to the applet which is querying it. I’ve downloaded a servlet engine, and it says I need to get my CLASSPATH setting right. What’s a CLASSPATH setting?

By the way, I’m new to Java.

Okay, that’s a bit extreme, but you get the idea. Many people are trying to dive straight into the deep end of Java, using not one but several APIs they don’t know, at the same time, in a language they don’t know. (In the case of JSPs, it may well be a programming language they don’t know embedded in a markup language they don’t know either.)

Continue reading

Standard
java

Struts 2.0

Apache Struts had become the de facto standard for web development for several years. Struts2 is the next generation of Apache Struts, developed by Patrick Lightbody. It is a mixture of Struts and WebWork.

When we speak about WebWork we are really referencing two projects – XWork and WebWork. XWork is a generic command framework. It provides many of the core features such as actions, validation and interceptors, and is completely execution context independent. XWork also provides an internal dependency inject mechanism that is used for configuration and factory implementation management.
WebWork, on the other hand, is a completely context dependent. It provides a wrapper around XWork with the context that is needed when working on web applications, along with specific implementations that make web developer easier.

The goal of Struts2 is simple – to make web development easier for the developer. To achieve this goal Struts2 provides features to reduce XML configuration via intelligent defaults, utilizes annotations and provides conventions over configuration.
Actions are now POJOs which increases testability and reduces coupling in the framework, and HTML form field data is converted to proper types for the action to use. Still further decreasing coupling is request processing has been made more modular by allowing a series of interceptors (custom or Struts2 provided) to provide pre-processing and post-processing functionality.

There are a lot of features in Struts 2 which are of interest. I’ll discuss a few here.

Action classes

An Struts 2 Action may implement an Action interface, along with other interfaces to enable optional and custom services. Struts 2 provides a base ActionSupport class to implement commonly used interfaces. Albeit, the Action interface is not required. Any POJO object with a execute signature can be used as an Struts 2 Action object.

Threading Model

Struts 2 Action objects are instantiated for each request, so there are no thread-safety issues. (In practice, servlet containers generate many throw-away objects per request, and one more object does not impose a performance penalty or impact garbage collection.)

Testability

Struts 2 Actions can be tested by instantiating the Action, setting properties, and invoking methods. Dependency Injection support also makes testing simpler.

Servlet Dependency

Struts 2 Actions are not coupled to a container. Most often the servlet contexts are represented as simple Maps, allowing Actions to be tested in isolation. Struts 2 Actions can still access the original request and response, if required. However, other architectural elements reduce or eliminate the need to access the HttpServetRequest or HttpServletResponse directly.

Harvesting Input

Struts 2 uses Action properties as input properties, eliminating the need for a second input object. Input properties may be rich object types which may have their own properties. The Action properties can can be accessed from the web page via the taglibs. Struts 2 also supports the ActionForm pattern, as well as POJO form objects and POJO Actions. Rich object types, including business or domain objects, can be used as input/output objects. The ModelDriven feature simplifies taglb references to POJO input objects.

Expression Language

Struts 2 can use JSTL, but the framework also supports a more powerful and flexible expression language called “Object Graph Notation Language” (OGNL).
The complete language guide can be found here.

Binding values into views

Struts 2 uses a “ValueStack” technology so that the taglibs can access values without coupling your view to the object type it is rendering. The ValueStack strategy allows reuse of views across a range of types which may have the same property name but different property types.

Type Conversion

Struts 2 uses OGNL for type conversion. The framework includes converters for basic and common object types and primitives.

Validation

Struts 2 supports manual validation via the validate method and the XWork Validation framework. The Xwork Validation Framework supports chaining validation into sub-properties using the validations defined for the properties class type and the validation context.

Control Of Action Execution

Struts 2 supports creating different lifecycles on a per Action basis via Interceptor Stacks. Custom stacks can be created and used with different Actions, as needed.

Standard
technology

Shelfari

There is this new and exiting site in which you can discuss and share books. Create a virtual shelf to show off your books. Connect with your friends. Discover exciting new titles. Voice your opinion. All for free. Shelfari makes it easy to see what your friends are reading, what others with similar tastes have enjoyed, and even get and give book recommendations.
Visit here.

Standard