What every computer science major should know
Portfolio versus resume Having emerged from engineering and mathematics, computer science programs take a resume-based approach to hiring off their graduates. A resume says nothing of a programmer's ability. Every computer science major should build a portfolio. A portfolio could be as simple as a personal blog, with a post for each project or accomplishment. A better portfolio would include per-project pages, and publicly browsable code (hosted perhaps on github or Google code). Contributions to open source should be linked and documented. A code portfolio allows employers to directly judge ability. GPAs and resumes do not. Professors should design course projects to impress on portfolios, and students, at the conclusion of each course, should take time to update them. Examples Technical communication Lone wolves in computer science are an endangered species. Modern computer scientists must practice persuasively and clearly communicating their ideas to non-programmers. Specific recommendations Java
Signs that you're a good programmer - Software Engineering Tips
The most frequently viewed page on this site is Signs you're a bad programmer, which has also now been published on dead trees by Hacker Monthly, and I think that behoves me to write its antithesis. "Bad programmer" is also considered inflammatory by some who think I'm speaking down to them. Not so; it was personal catharsis from an author who exhibited many of those problems himself. And what I think made the article popular was the "remedies"--I didn't want someone to get depressed when they recognized themselves, I wanted to be constructive. Therefore if you think you're missing any of the qualities below, don't be offended. I didn't pick these up for a while, either, and many of them came from watching other programmers or reading their code. 1. The compiler and runtime can often answer a question faster than a human can. Symptoms How to acquire this trait Are you excessively cautious? Note: A programmer who "suggests wacky and unrealistic solutions" is not always a bad programmer. 2.
The Hello World Collection
New programming slang - Programming
A question recently posted on stackoverflow.com asked for people to submit programming terms that they or their team have coined and have come into regular use in their own circles. Below are the most popular answers Yoda Conditions The act of using if (constant == variable) instead of natural if (variable == constant),; for example, if (4 == foo). Because it is like "if it is the blue – this is the sky" or "if that is tall – this is a man." Pokémon Exception Handling When you catch all the exceptions and then you try somehow to analyze them. try{ //code }catch ( Exception ex){ if( ex instanceof SubException){ //code }else if(ex instanceof SubSubException){ //code }else{ //code } } Discuss an example here Egyptian brackets This is the style of brackets, when an opening bracket is placed at the end of this line: if (a == b) { printf("hello"); } Why do we call this style "Egyptian brackets?" Different types of bug reports Stringly Typed It is a riff on strongly-typed. Other types of errors
Singleton Pattern - Web Tutorials - avajava.com
Singleton Pattern Author: Deron Eriksson Description: This Java tutorial describes the singleton pattern, a popular creational design pattern. Tutorial created using: Windows Vista || JDK 1.6.0_11 || Eclipse JEE Ganymede SR1 (Eclipse 3.4.1) A singleton is a class that is instantiated only once. This is typically accomplished by creating a static field in the class representing the class. The SingletonExample class is an example of a typical singleton class. SingletonExample.java package com.cakes; public class SingletonExample { private static SingletonExample singletonExample = null; private SingletonExample() { } public static SingletonExample getInstance() { if (singletonExample == null) { singletonExample = new SingletonExample(); } return singletonExample; } public void sayHello() { System.out.println("Hello"); } } The Demo class obtains a SingletonExample singleton class via the call to the static SingletonExample.getInstance(). Demo.java
Humor - How to Shoot Yourself In the Foot Using Any Programming Language
The proliferation of modern programming languages (all of which seem to have stolen countless features from one another) sometimes makes it difficult to remember what language you're currently using. This guide is offered as a public service to help programmers who find themselves in such dilemmas. 370 JCL You send your foot down to MIS with a 4000-page document explaining how you want it to be shot. Three years later, your foot comes back deep-fried. Ada After correctly packaging your foot, you attempt to concurrently load the gun, pull the trigger, scream, and shoot yourself in the foot. When you try, however, you discover that your foot is of the wrong type. APL You shoot yourself in the foot, then spend all day figuring out how to do it in fewer characters. ASP.NET Find a gun, it falls apart. Assembly You try to shoot yourself in the foot only to discover you must first reinvent the gun, the bullet, and your foot. BASIC Shoot yourself in the foot with a water pistol.
Don't Call Yourself A Programmer, And Other Career Advice
If there was one course I could add to every engineering education, it wouldn’t involve compilers or gates or time complexity. It would be Realities Of Your Industry 101, because we don’t teach them and this results in lots of unnecessary pain and suffering. This post aspires to be README.txt for your career as a young engineer. 90% of programming jobs are in creating Line of Business software: Economics 101: the price for anything (including you) is a function of the supply of it and demand for it. There are companies which create software which actually gets used by customers, which describes almost everything that you probably think of when you think of software. Engineers are hired to create business value, not to program things: Businesses do things for irrational and political reasons all the time (see below), but in the main they converge on doing things which increase revenue or reduce costs. Do Java programmers make more money than .NET programmers? “Read ad. Wrong question.
The Basics of C Programming"
The previous discussion becomes a little clearer if you understand how memory addresses work in a computer's hardware. If you have not read it already, now would be a good time to read How Bits and Bytes Work to fully understand bits, bytes and words. All computers have memory, also known as RAM (random access memory). float f; This statement says, "Declare a location named f that can hold one floating point value." While you think of the variable f, the computer thinks of a specific address in memory (for example, 248,440). f = 3.14; The compiler might translate that into, "Load the value 3.14 into memory location 248,440." There are, by the way, several interesting side effects to the way your computer treats memory. int i, s[4], t[4], u=0; for (i=0; i<=4; i++) { s[i] = i; t[i] =i; } printf("s:t\n"); for (i=0; i<=4; i++) printf("%d:%d\n", s[i], t[i]); printf("u = %d\n", u); The output that you see from the program will probably look like this: s:t 1:5 2:2 3:3 4:4 5:5 u = 5 s[1000000] = 5;
Dijkstra Archive: A Short Introduction to the Art of Programming (EWD 316), Chapter 9
9. The problem of eight queens The problem is to make a program generating all configurations of eight queens on a chess board of 8 * 8 squares, such that no queen can take any of the others. This means that in the configurations sought no two queens may be on the same row, on the same column or on the same diagonal. We don't have an operator generating all these configurations: this operator is exactly what we have to make. Now a (very general!) With the aid of the generator (3) for the elements of set B, the elements of set B can then be generated in turn; they will be subjected to the decision criterion (2) which decides whether they have to be skipped or handed over, thus generating elements of set A. Three remarks are in order. 1) If the whole approach makes sense, set B is not identical to set A and as it must contain set A as a (true) subset, it must be larger. In a moment of optimism one could think that this is an easy matter, thinking of the following technique. Note. How?