Tuesday, November 11, 2008

neopi, oracle on linux...10gr2..and my birthday.

oh, and today is my birthday. yay.

so, i finally got around to writing about this. I succesfully got ora 10gr2 installed on RHEL5. thanks to the help of gathering dependencies by this free product called NEOPI. Its pretty nice...just a kind of automatic dependency generator, and it runs some other checks too, but it helped solve the issues I was running into with the misplaced/mislinked libraries. hopefully that puts the RHEL5 Oracle10gr2 fears to rest...and I can move on.

Thursday, November 6, 2008

Oracle 10gR2 on RHEL5

Preamble

This manual is directed show how to install Oracle database 10g on RedHat Enterprise Linux 5. The article show the process from system administrator point of view ad try to simplicity most of the tasks not related to system administration will in deep explanation of tasks and impacts of them. Be aware RHEL 5 x86 is not supported platform (in this moment) for Oracle 10g so when you ask questions in metalink don't be surprised get no answer. According to the product documentation supported platforms for x96 are RHEL AS/ES 3.4 or later, RHEL 4, SUSE Linux Enterprise Server 9.0SP2 or later and Asianux 1.0 and 2.0. Additionally you can't expect reliability from this system for production environment.

Hardware requirements

From documentation you read Oracle 10g need at least 1 gigabyte of memory, but the absolute minimum is 512 MB. OK, with so little memory you are on the bottom line for required shared memory, but database can start. for testing 768 MB sound's much better. Similar is the situation with swap. Everything will work fine with only 1024 MB of swap.

Software requirements

List of packages you will need for install Oracle 10g on RHEL include

binutils
compat-db
compat-libstdc++
control-center
gcc
gcc-c++
glibc
glibc-common
gnome-libs
libstdc++
libstdc++-devel
make
pdksh (RHEL 5 ships with ksh instead)
sysstat
xscreensaver
setarch
libXp (to start runInstaller)

Preinstalation tasks

Let's create users and groups for installation

# groupadd dba
# groupadd oinstall
# useradd -G dba -d /home/oracle -g oinstall oracle
# passwd oracle

Next create filesystem for oracle files and database. Do not forget to create appropriate changes in /etc/fstab to mount this filesystem on startup. In documentation of product is mentioned to use only RAID10 array(s) and for production is wise to use hardware based arrays, but here we just play and any filesystem and volume will be OK. Transfer files to the machine and extract zip's somewhere. I write files, because i recommend for installation not only Oracle database server, but 10g Release 2 (10.2.0.3) Patch Set 2 ever only for testing and playing. For more info about the the patch set read document 316900.1 and download file p5337014_10203_LINUX.zip from metalink. Now is time to login on the machine as root to set some parameters in linux kernel and operating system

- check if FQHN exist in /etc/hosts
- check the id of oracle user to ensure oinstall is primary group of user and user is member of group dba
- check for existence of user nobody
- check and set if need the parameters for semaphors:
semmsl - 250
semmns - 32000
semopm - 100
semmni – 128

Semaphores explanation

semmsl – maximum number of semaphores per semaphore identifier. Should be increased carefully because very big number will eat memory not used later
semmns - maximum number of semaphores in the system. Size it carefully because of above reason
semopm - Define maximum number of semaphore operations per system call
semmni – maximum number of semaphores per semaphore identifier. Do not increase it over needed limit, because of waste of memory
if you have attached to the server additional hardware read carefully documentation of drivers for this hardware, because for example some drivers for FC controllers need additional semaphors to be set per controller


- check and set if need the parameters for shared memory
shmall 2097152
shmmax Half the size of physical memory (in bytes) or current value if bigger
shmmni 4096

Shared memory explanation

shmall - maximum number of shared memory pages. If you set it to too low value can slowdown any program usng shared memory
shmmax – maximum size of shared memory segment that can be allocated in the memory. For servers with lots of memory can be increased to 80% of memory to avoid shared memory fragmentation
shmmni – maximum number of segments. It's good idea to change it only by vendor recommendation


- check and set if need the parameters for maximum number of file handlers, supported by system
file-max 65536

- check and set if need the parameters for network
ip_local_port_range Minimum:1024 Maximum:65000
rmem_default 1048576
rmem_max 1048576
wmem_default 262144
wmem_max 262144

Network setting explanation

ip_local_port_range – define full range of local ports in Linux, normally upper limit is 32000
rmem_default Default Receive Window
rmem_max Maximum Receive Window
wmem_default Default Send Window
wmem_max Maximum Send Window



So you can add you /etc/sysctl.conf file something like

kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 1048576
net.core.rmem_max = 1048576
net.core.wmem_default = 262144
net.core.wmem_max = 262144

and execute

# sysctl -p

Next is time to set some environment variables for oracle user. Do not forget to put the in shell profile for oracle user. They should look's like

ORACLE_BASE=/home/oracle
ORACLE_HOME=$ORACLE_BASE/product/10.2.0
ORACLE_SID=test01

On this point it is very good idea to check the available diskspace in directory where will be installed oracle – you will need 4 GB average for software and database. To start successfully installer it's need to edit /etc/redhat-release and to change release from 5 to 4. Do not forget to return the value back later, otherwise you will be no able to update your server. Next is time to run runInstall. You will need running X server, because interactive installation need graphic display

Actual installation

On the first step we choose advanced installation to have better control over the packages and options to be installed on the server. Later if it's need we can install additional packages almost seamless. Our target is Enterprise Server as more powerful and complex. on the next step Oracle Installer check for prerequisites for installation as physical memory, swap, networking, environment variables, etc. If you get warning about the amount of memory you can skip it without any problem. Next we will install only software without create new database. There is program, named dbca – database configuration assistant which one can help to create new database. Then read the summary screen and go back to change some packages you do not need or other parameter. It's out of scope of this document to discuss the idea and purpose of packages you can find in oracle database. Next we press install and wait a lot, because of very long process of installation. On the bottom part of the screen you can see the path to log file for current installation and you can inspect it if you get some errors or just from curiosity. In on of the stages of installation (almost on the end) you should execute 2 scripts as root user. And at the end we have installed Oracle database 10g. If you have patch mentioned above installation process for patch is similar: runInstaller....

Et voila, we are ready to play and test oracle on our RHEL 5 server :-)

Tuesday, November 4, 2008

tar over ssh to pipe files..

I didn't have enough space on a vm i just built to copy all the data over as a tar and then untar it, so I went on a search...I found this and it worked VERY well:

From: http://www.cyberciti.biz/faq/howto-use-tar-command-through-network-over-ssh-session/

Q. How do I use tar command over secure ssh session?

A. The GNU version of the tar archiving utility (and other old version of tar) can be use through network over ssh session. Do not use telnet command, it is insecure. You can use Unix/Linux pipes to create actives. Following command backups /wwwdata directory to dumpserver.nixcraft.in (IP 192.168.1.201) host over ssh session.

The default first SCSI tape drive under Linux is /dev/st0. You can read more about tape drives naming convention used under Linux here.

# tar zcvf - /wwwdata | ssh root@dumpserver.nixcraft.in "cat > /backup/wwwdata.tar.gz"OR# tar zcvf - /wwwdata | ssh root@192.168.1.201 "cat > /backup/wwwdata.tar.gz"

Output:

tar: Removing leading `/' from member names
/wwwdata/
/wwwdata/n/nixcraft.in/
/wwwdata/c/cyberciti.biz/
....
..
...
Password:

You can also use dd command for clarity purpose:# tar cvzf - /wwwdata | ssh ssh root@192.168.1.201 "dd of=/backup/wwwdata.tar.gz"It is also possible to dump backup to remote tape device:# tar cvzf - /wwwdata | ssh ssh root@192.168.1.201 "cat > /dev/nst0"OR you can use mt to rewind tape and then dump it using cat command:# tar cvzf - /wwwdata | ssh ssh root@192.168.1.201 $(mt -f /dev/nst0 rewind; cat > /dev/nst0)$You can restore tar backup over ssh session: # cd /
# ssh root@192.168.1.201 "cat /backup/wwwdata.tar.gz" | tar zxvf -
If you wish to use above command in cron job or scripts then consider SSH keys to get rid of the passwords.

Friday, October 17, 2008

ubuntu intrepid ibex java needs icedtea

in order to get mozilla working with java, you need to install the icedtea plugin after installing the open java stuff.

Thursday, October 16, 2008

unix and windows: carriage returns with tr/sed/awk

cat -v myfile.csv

...and then you will see them at the end of the line as ^M (Ctrl-M)

delete them using tr like this, but this will only work in the following form if "\r" is recognised as a carriage return character. Some versions of tr and sed do not. So before you try this out you should set up a test file with a few "r"s in it in obvious places to make sure the following command is not just deleting "r"s.

tr -d '\r' <> outfile.csv

If the above command deleted "r"s instead of carriage returns then instead of using '\r' use 'Cntl-v-m'. The Cntl-v works on a few shells to let it know that you are going to enter a special character and the "m" you follow it with indicates a carriage return. "m" as in the "^M" you see at the end of the lines when you use cat -v.

There are other ways of removing these carriage returns. You can use sed to do it but again you have to check is it accepts "\r" as a carriage return by experimenting on a very small test file with a few obvious "r"s in it.

sed 's/\r$//' infile.csv > outfile.csv

On a final note, you might have to convert a Unix file to a DOS/Windows file sometimes. You can do it like this:

awk '{ print $0 "\r"}' unix.txt > dos.txt

---

simple:
tr -d '\015' <> new.file

more simple:
perl -pi -e 's/\015//g' file

Tuesday, October 14, 2008

freebsd jails from sysinstall

sysinstall nonInteractive=yes _ftpPath=ftp://ftp2.ch.freebsd.org/pub/FreeBSD mediaSetFTP distSetMinimum installRoot=/var/jails/192.168.0.1 releaseName=6.1-RELEASE installCommit

Friday, October 10, 2008

freebsd native firefox, linux-firefox, and linux-opera with flash and java.

ok, i like firefox. dont really like opera. but...i had to succumb.

running freebsd 7 with native firefox for java v6 (diablo-latte) works great, and adds appropriate java entries to the pluginreg.dat which is actually shared with linux-firefox (for proper flash support...nspluginwrapper was causing flash to be out of synch (youtube) for me, but linux-firefox with linux-flashplugin7 worked fine.

linux-opera to the rescue ; everytime i started linux-firefox it would overwrite my pluginreg.dat (which i had some specific java variables in there) - it pissed me off that i couldn't use both firefoxes... i thought about maybe using a diff profile but it pulls pluginreg.dat before the profiles...so i just decided to use linux-opera and be done w/it. thats what i decided on.

btw, i hate flash and java. but both are necessary for my line of work...bullshit.

i need flash to watch videos and listen to music on youtube.
i need java to work with some screwed up oracle applications we use at work.

at least i get to use unix.

Saturday, September 27, 2008

Renting or Owning a House...Hmm.

Found this really good article... on yahoo. via digg i believe.

Taken from : http://realestate.yahoo.com/promo/renting-makes-more-financial-sense-than-homeownership.html;_ylc=X3oDMTFta3Jqcjk3BF9TAzI3MTYxNDkEX3MDOTc2MjA0NjUEc2VjA2ZwLXRvZGF5BHNsawNyZW50aW5nLWJldHRlcg--

Renting Makes More Financial Sense Than Homeownership

By Jack Hough

Sep 26th, 2008

ARTICLE TOOLS:

I have something un-American to confess: I rent an apartment, despite having enough money to buy a house. I plan to keep renting for as long as I can. I'm not just holding out for better prices. Renting will make me richer.

I normally write about stocks for SmartMoney.com, but the boss asked me to explain to readers my reason for renting. Here goes: Businesses are great investments while houses are poor ones, so I'd rather rent the latter and own the former.

Stocks vs. Houses: Returns

Shares of businesses return 7% a year over long time periods. I'm subtracting for inflation, gradual price increases for everything from a can of beer to an ear exam. (After-inflation or "real" returns are the only ones that matter. The point of increasing wealth is to increase buying power, not numbers on an account statement.) Shares have been remarkably consistent over the past two centuries in their 7% real returns. In Jeremy Siegel's book, "Stocks for the Long Term," he finds that real returns averaged 7.0% over nearly seven decades ending 1870, then 6.6% through 1925 and then 6.9% through 2004.

The average real return for houses over long time periods might surprise you. It's zero.

Shares return 7% a year after inflation because that's how fast companies tend to increase their profits. Houses have their own version of profits: rents. Tenant-occupied houses generate actual rents while owner-occupied houses generate ones that are implied but no less real: the rents their owners don't have to pay each year. House prices and rents have been closely linked throughout history, with both increasing at the rate of inflation, or about 3% a year since 1900. A house, after all, is an ordinary good. It can't think up ways to drive profits like a company's managers can. Absent artificial boosts to demand, house prices will increase at the rate of inflation over long time periods for a real return of zero.

Robert Shiller, a Yale economist and author of "Irrational Exuberance," which predicted the stock price collapse in 2000, has recently turned his eye to house prices. Between 1890 and 2004 he finds that real house returns would've been zero if not for two brief periods: one immediately following World War II and another since about 2000. (More on them in a moment.) Even if we include these periods houses returned just 0.4% a year, he says.

The average pundit, planner, lender or broker making the case for ownership doesn't look at returns since 1890. Sometimes they reduce the matter to maxims about "building equity" and "paying yourself" instead of "throwing money down the drain." If they do look at returns they focus on recent ones. Those tell a different story.

Between World War II and 2000 house prices beat inflation by about two percentage points a year. (Stocks during that time beat inflation by their usual seven percentage points a year.) Since 2000 houses have outpaced inflation by six percentage points a year. (Stocks have merely matched inflation.)

Stocks vs. Houses: Valuations

But while stock returns have come from increased earnings, house returns have come from ballooning valuations, not increased rents. The ratio of share prices to company earnings (the price/earnings ratio) has remained relatively steady. It's about 16 today, close to both its 1940 value of 17 and to its 130-year average of about 15. Not so, the ratio of house prices to rents. In 1940 the median single-family house price was $2,938, according to the U.S. Census, while the median rent was $27 a month, including utilities. That means the ratio of prices to annual rents was 9. By 2000 the ratio had swelled to 17. In 2005 it hit 20. We can adjust for the size of dwellings, but it doesn't make much difference. The ratio of single-family house prices to three-bedroom apartments is 19. In SmartMoney.com's home town of Manhattan, where more detailed data is available, the ratio of condo prices per square foot to apartment rents per square foot is 22.

Two main events have caused house valuations to inflate since World War II. First, the government subsidized housing by relaxing borrowing standards. Prior to the creation of the Federal Housing Authority in 1934 house buyers who borrowed typically put up 40% of the purchase price in cash for a five- to 15-year loan. By insuring mortgages, the FHA permitted terms of up to 20 years and down payments of just 20%. It later expanded the repayment periods to 30 years and reduced down payments to 5%. Today down payments for FHA loans are as low as 3%. Aggressive lenders offer loans with no down payments or even negative ones so that house buyers can borrow the full purchase price plus closing costs. Some require little documentation of income, assets or ability to pay.

That means more Americans can win loans for homes, and they can win them for far more expensive (larger) homes than their incomes previously allowed. Two-thirds of American households own homes today, up from 44% in 1940, even though the percentage of Americans living alone has tripled during that time. The ratio of house values to incomes has risen 260% in just under four decades.

A second event helped boost house demand in recent years. Share prices plunged in 2000. The Federal Reserve, fearing that the decline in stock wealth would cause consumers to stop spending, reduced the federal-funds rate, the core interest rate that determines the cost of everything from credit cards to mortgages, to 1% by the summer of 2003 from 6.5% at the start of 2001. Since most of the cost of financing a house over 30 years is interest, monthly house payments shrank and demand for houses soared. In some markets a string of big yearly increases in house prices led to panic buying.

Stocks vs. Houses: Conclusion

For house returns over the next 20 years to match those over the past 20, the government and private lenders would have to "up the ante" by relaxing borrowing standards further. Given the recent attention paid to swelling foreclosures, that seems unlikely. I suspect real returns will turn negative over most of the next two decades, but that house prices won't necessarily dip. Since 1963 they've done so in only two years, vs. 18 for stocks. That's because homeowners mostly just stick it out rather than sell during soft markets. But if house prices remain flat, they produce negative real returns due to the creep of inflation. According to calculations made by The Economist in the summer of 2005, house prices would have to stay flat for 12 years with annual inflation at 2.5% for the ratio of prices to rents to fall from its 2005 perch to merely its 1975 to 2000 average.

So to sum up why I rent: Shares right now cost 16 times earnings and over long time periods return 7% a year after inflation. Houses right now cost 19 times their "earnings" and over long time periods return zero after inflation. And they look likely to return less than that for a while.

On the following page I've tried to anticipate and address questions and objections.


Questions/Objections

"You can't live in your stocks" or "Renters throw money down the drain."

Rent is the cost of owning shares with money you would otherwise spend on a house. Houses have ownership costs, too: taxes, insurance and maintenance. Rent costs about 5% of house prices each year if we apply the price/rent ratio of 19. House incidentals often cost around 2%. If you have $300,000 and a choice between spending it on a house or shares, you'll pay $6,000 a year in incidentals if you buy the house or about $15,000 a year ($1,250 a month) in rent if you buy the shares. But the shares will return $21,000 a year after inflation while the house will return zero. (My numbers work out even better than these. I pay a smidgen less than $1,250 a month for rent, while house prices in my neighborhood are far higher than $300,000.)

Note that houses and shares have transaction costs, too. Home buyers pay around 1% in closing costs when they buy and 6% in broker commissions when they sell. Share buyers pay $10 trading commissions, which are negligible for buy-and-hold investors.

"House buyers get tax breaks."

So do share buyers, but both are a bad deal. The interest on loans for houses (mortgages) and shares (margin balances) is tax-deductible. But the rates are almost always too high. A big house loan presently costs 6.1% interest while a big stock loan costs about 9%. For the returns, we can forget about inflation because it helps debtors while hurting investors, making it a wash for those who borrow to invest. Still, nominal returns of 3% for houses and 10% for stocks aren't high enough to justify those rates. The tax breaks aren't really breaks at all. Moreover, a majority of homeowners don't claim them. Their incomes are low enough to make the standard deduction a better deal.

"What about the pride of home ownership?"

It's not for me. I define ownership as no longer having to pay for something and being able to do as I please with it. I own my coffee maker. House owners must pay taxes each year even when their mortgage payments are done. In certain markets they can't even make changes to the houses they've paid for without seeking the approval of others. Personally, I feel the pride of ownership for shares of businesses, and I'm proud to occupy a nice place while leaving the burden of poor returns and maintenance to someone else.

"You seem to knock government housing subsidies, but they've helped many Americans afford homes."

My inner socialist agrees. My other inner socialist worries that the government has effectively raised prices to the point where the middle class can't afford houses, or buries itself in debt to own them. My inner capitalist is too busy watching shares to care about house prices. My inner conspiracy theorist notes that while politicians tout the social benefits of homeownership none mentions its tax benefits to the government. I pay no taxes on the overall value of my stock portfolio, just on my cashed-in gains and collected dividends. But Americans pay taxes on the full $11 trillion worth of housing they own plus the $10 trillion worth of it they're still paying off.

"Houses are bigger than apartments."

True, and both can be rented. A third of renters live in single-family houses. I prefer an apartment for now. I like not having to fill it with stuff. I like using a fifth of the energy of the average American. I like being 20 minutes from work and (this is unique to New Yorkers) not having owned a car in 10 years. I like not stressing over whether to get the marble countertops or the imported tiles or the 52-inch flat screen. I'm not especially frugal; I spend a teacher's salary each year on restaurants and travel. But I guess I'm too busy or lazy right now to bother with a big house and its innards.

"Are you saying I should sell my big house and rent an apartment instead?"

No, unless you have more space than you need and moving wouldn't be disruptive to your family, and you want to cash in on recent housing gains, make more money over the next couple of decades, use less energy while simplifying your life, and you don't mind seeming odd to friends. In which case, yes. But really, I'm not trying to win anyone over. Strong demand for houses keeps my rent cheap.

"Renting is for poor people."

True. But it's for rich people, too. The average renter makes about $34,000 a year, but while the percentage of renters declines after incomes exceed $20,000 and rents exceed $600 a month, it jumps again once incomes top $150,000 and rents top $1,200 a month. In other words, poor people rent modest apartments for lack of choice. Middle-income people buy houses. High-income people, presumably with a dose of financial savvy, often rent nice apartments instead of buying.

"You say houses return zero. But I've made a fortune on my house in recent years."

I'm referring to inflation-adjusted returns over long time periods, absent external boosts to demand. You're referring to gross returns over a short time period that combined lax borrowing standards and ultra-low interest rates. Over the next 20 years I believe houses will return zero or slightly less after inflation and that stocks will return 7%.

"So you're never going to buy a house? What about raising a family?"

I might buy one eventually, but the longer I can put it off the more I'll get out of the shares I'll have to sell to afford it. I'm 34 now with a fiancée and a fish. I'm going to try to rent for at least 10 more years. If I have kids I'll probably move into a big apartment or a house once they reach running-around age. I'll rent, most likely.


Friday, September 26, 2008

10 Books that will Substitute A Computer Science Degree

Found this list of books online, copied it down because I thought it was interesting. Now I'll share it with you. I do not have a CS Degree...and I do not want one - My degree is in History. However, this might be of interest to those who don't have one and DO want one...Or those who have one they're not happy with. (Hence, why I don't have one.)


1. Godel Escher and Bach by Douglas Hofstadter
Godel, Escher and Bach, written by Douglas Hofstadter, while the title would suggest it is discussion of a mathematician, an artist, and a composer, is a complex examination of how human beings develop perception and meaning. More specifically, the book explores, through a series of dialogues and narrations, how symbols, thought and language are all intertwined and how reality is essentially a composition of overlapping meanings and perceptions. The book challenges the reader to observe the system of symbolic meanings around him or her objectively.
2. The Art of Programming by Donald Knuth
The Art of Programming, by Donald Knuth, is a comprehensive, multi-volume work discussing various programming algorithms and their analysis. The work was voted by American Scientist as one of the twelve best scientific monographs of the twentieth century. The author famously offered a reward of two dollars and fifty cents for anyone who found and reported an error in the text. The work features exercises of multiple difficulty levels, from basic warm up exercises to ongoing research problems, allowing the reader to work up his skill and familiarity with the material.
3. The Elements of Programming Style by Brian W. Kernighan and P. J. Plauger
The Elements of Programming Style, by Brian W. Kernighan and P. J. Plauger, is an influential book on the study of computer programming styles and languages. It endorses the strategy that computer programs should be written not only to satisfy the compiler, but also keep the human readers in mind. The book utilizes examples taken from actual, published programs. The book’s recommendations are made in the context of the examples which are realistic rather than an academic vacuum.
4. Theory of Parsing, Translation and Compiling, by Alfred V. Aho, and Jeffrey D. Ullman
The book, Theory of Parsing, Translation and Compiling, by Alfred V. Aho, and Jeffrey D. Ullman, is intended for a senior or graduate course in compiling theory. It is a theoretical treatment of a practical computer science subject. Since computer science is an ever changing area of study, this book emphasizes ideas, rather than specific application details. The algorithms and concepts presented in the book should survive to new generations of computer technology, programs and systems. Numerous examples are given, with specific context, rather than on the large complicated contexts normally found in implementations, even in cases where the theoretical ideas are difficult to understand in isolation.
5. The Computer and the Brain, by John von Neumann
The Computer and the Brain, by John von Neumann, is theoretical work which examines mathematics, logic’s, and statistics as the basic tools of information. The book explores how these subjects make up the entirety of the planning, usage and coding of computers. The author explores how mathematics and logic are related to the functions of the organic human brain in the same way they are applied to the artificial automated computer processor.
6. A Programming Language, by Kenneth E. Iverson
A Programming Language, by Kenneth E. Iverson, explores how programming language is a signifier for a whole host of mathematical algorithms and procedures. The book focuses on specific areas of application which serve as universal examples and are chosen to illustrate particular facets of the effort to design explicit and concise programming languages.
7. Writing Efficient Programs, by Jon Louis Bentley
Writing Efficient Programs, by Jon Louis Bentley, illustrates to the reader how the
primary task of a software designer is the development of programs that are not only useful, but easy and inexpensive to maintain. Moreover, the book explores how software must have specific application as well as versatility to me modified for unforeseen uses. Lastly, efficient programs must be efficient to write as the cost of writing will determine their competitiveness in the software market.
8. Computation: Finite and Infinite Machines, by Marvin L. Minsky
Computation: Finite and Infinite Machines, by Marvin L. Minsky, explores how the
introduction of the computer in the last half century has affected the fabric of human society. The book essays to describe the application and limitation of computer technology as it relates to human progress and potential.
9. Operating System Principles, by Per Brinch Hansen
Operating System Principles, by Per Brinch Hansen, gives computer science and professional programmers a general explanation and analysis of operating systems. The book explains how an OS works to allow sharing of information easy and efficient.
10. Artificial Intelligence, by Elaine Rich
Artificial Intelligence, by Elaine Rich, gives programmers an introduction to the techniques and problems associated with A.I. The book features references throughout that allow the reader to pursue the topics deeper than would be possible within the defined scope and space limitations of the book.
If You Like What You Read Please Take The Time To Share It!

Tuesday, September 9, 2008

Samba / CIFS mounting in Xubuntu Linux with OS X Shares

Add this to /etc/fstab
//saturn/sharename /home/username/mounted.smbfsdir smbfs iocharset=utf8,credentials=/home/username/.smbcredentials,uid=1000 0 0

cat ~username/.smbcredentials
username=user
password=pass

perms on .smbcredentials
-rw------- 1 root group 37 2008-09-09 09:12 .smbcredentials

-- On the Samba Server so you can follow symlinks properly in the share dir
follow symlinks = yes
wide symlinks = yes
unix extensions = no

Tuesday, August 12, 2008

Oh No! Vmware ESXi bug.

Interesting details on the bug affecting vmware. For me, specifically ESXi - I just killed ntpd for now.

--

As of tomorrow morning, VM's running on all hosts with ESX 3.5U2 in enterprise configurations will not power on. VMotion/HA/DRS will probably also not work.

Boom.

Apparently, there is some bug in the vmware license management code. VMware is scrambling to figure out what happened and put out a patch.

Running VM's will not be immediately impacted.

There is a major discussion going on in the vmware communities about the issue: http://communities.vmware.com/thread/162377?tstart=0

OK, while we're all remaining calm....just imagine the implications that bugs like this can occur and get past QA testing....5 years down the road, nearly all server apps worldwide running in VM's if you believe a lot of forecasts ......some country decides to initiate cyberwarfare and manages to get a backdoor into whatever is the prevailing hypervisor of the day.....boom. All your VM's are belong to us.

I honestly think a lot of the hype from those who want to build a vm security industry is crap, but god protect us if the baseline code for critical hypervisors like ESX isn't kept secure and regularly audited.

I'd love to find out what happened here.

What regression testing on new releases does vmware do to check for date based bugs? I'd think they'd at least check for simple things like changing the date to 1 year or 1 month in the future.

UPDATE: Frank Wegner has posted the following suggestions:

You can see the latest status here: http://kb.vmware.com/kb/1006716 Please check back often, because it will notify you when this issue has been fixed. Until then the best workaround I can think of is:

* Do nothing
* Turn DRS off
* Avoid VMotion
* Avoid to power off VM's

I'd council against turning DRS off as that actually deletes resource pool settings....instead, set sensitivity to 5 which should effectively disable it w/ minimal impact.

UPDATE 2: VMware Website appears to be having trouble keeping up with people requesting updates.

UPDATE 3: VMware has stated they will have fixes available in 36hrs at the earliest.

UPDATE 4: Anand Mewalal comments:

We used the following workaround to power on the VM's.
Find the host where a VM is located
run ' vmware-cmd -l ' to list the vms.
issue the commands:
service ntpd stop
date -s 08/01/2008
vmware-cmd /vmfs/volumes/vm path/vmname.vmx start
service ntpd start

UPDATE 5: Apparently, there are no easily seen warnings in logs/etc or VC prior to hitting the bug. VC will continue to show the hosts as licensed and no errors will appear in vmkernel log file until you try to start up a new vm, reboot a vm, or reboot the host.

UPDATE 6: Welcome Slashdot readers! I've temporarily disabled comments to allow the server vm to handle the load. Apparently Movable Type 4.1 executes a seperate perl cgi script to handle comments on each page load. Load times might have been slow for the last 45 minutes, but should be OK now.

UPDATE 7: I made some minor corrections to this entry that others have requested.

SSH enable in VMWARE ESXi

ESXi 3.5 does ship with the ability to run SSH, but this is disabled by default (and is not supported).

1) At the console of the ESXi host, press ALT-F1 to access the console window.
2) Enter unsupported in the console and then press Enter. You will not see the text you type in.
3) If you typed in unsupported correctly, you will see the Tech Support Mode warning and a password prompt. Enter the password for the root login.
4) You should then see the prompt of ~ #. Edit the file inetd.conf (enter the command vi /etc/inetd.conf).
5) Find the line that begins with #ssh and remove the #. Then save the file. If you're new to using vi, then move the cursor down to #ssh line and then press the Insert key. Move the cursor over one space and then hit backspace to delete the #. Then press ESC and type in :wq to save the file and exit vi. If you make a mistake, you can press the ESC key and then type it :q! to quit vi without saving the file.
6) Once you've closed the vi editor, run the command /sbin/services.sh restart to restart the management services. You'll now be able to connect to the ESXi host with a SSH client.

ESXi Adventures -

From: http://traviskensil.wordpress.com/2008/08/11/esxi-adventures/

ESXi Adventures

August 11, 2008 · No Comments

This post will focus on some of the positives and negatives and some of my experiences thus far that I’ve had with ESXi. Part of this post will also outline some of my plans for backup/restore with the hopes of generating other’s opinions of the viability of these options, since very few exist from VMware currently.

COMPATIBILITY: Personally, I’ve always gone against the “norm” and run stuff that shouldn’t be run on things…I guess I like to tempt the odds. Same thing with ESXi. So far I’ve run ESXi on a Dell Poweredge 1900 and my Intel-motherboard based workstation with zero issues. My theory goes that most modern day servers/workstations should be compatible with it; or at least should have some way of making it work. Will soon be testing it on a Dell 2600 as well. Also tested on a Gateway workstation (E series) and confirmed IT DOESN’T work. The PERC controllers seem to be recognized and play well with ESXi. I know I’ve seen that HP and some Sun stuff also works well…we are 100% Dell for servers so thats the limit of my testing ability. I am sure as time rolls on that ESXi will mature in its compatibility ability.

INSTALL: Install is a piece of cake. Basically goto VMware’s site, give them your life history, then download the 200MB .ISO file and receive your license key and your good to go. Install should find your RAID/SATA controller right off the bat and present it as an option….if it doesn’t…..better switch hardware. I have also been investigating USB-boot…some guy on the Vmware communities’ seems to have got it figured out.

http://communities.vmware.com/blogs/Knorrhane/2008/01/21/installing-esx-3i-on-usb-stick

For my platform I just installed to the local disks; will be migrating to the USB drive soon!

BACKUP: I hate to complain about FREE but come on VMware….at least give us something to backup with. Maybe we don’t need enterprise features but a basic tool would be nice. Now, apparently according to the documentation there is the CLI-based way but there still should be some kind of GUI to it all…especially when you consider how nice the Infrastructure client is. This is one area where ESXi DOES NOT shine at all….in fact its a large disappointment! Later this year some 3rd party products are suppost to begin supporting ESXi backup but most can’t wait 3-6 months while thats figured out. If Microsoft Hypervisor has this it definitely could turn the tables for our support of VMware. I have however, devised a simple way to provide a basic level of backup. It is as follows….

  • ESX CONFIG/HOST

1) Create image of USB drive contents (using Winimage http://www.winimage.com/winimage.htm or other similiar tools). This should in theory preserve the entire ESXi config, directory/drive structure required to get the system going. The first part is to take the image and save it somewhere.

2) The second part is to take the image of USB1 and copy it to USB2 which should allow for a backup USB stick should the primary fail or become corrupt.

  • Virtual Machines

1) After successfully creating/importing the virtual machine, power it done properly. Go into the Datastore Browser and manually download the virtual machine files. Store in a safe place.

2) Obviously take the usual backups from within the virtual machine, use a backup proxy or however you perform “normal” backups.

That is my backup plan for ESXi currently. I have tested parts of it and found success…others need work. Ideally this would allow you to restore the ESXi config, restore your virtual machine then merge the most current data and be back up and running in a short period of time. I have yet to test this process. Please….let me know your thoughts as well….anyone got a better solution?

VMware Infrastructure Client

This is the one place ESXi shines and shines bright! The interface is clean and very easy. Tabs give access to everything one would need to know. I LOVE the networking visualization it shows; groups physical cards to virtual switches/groups…very nice. The performance and reporting per virtual machine or per server is sweet! My only gripe is that I experienced some bad delay when switching virtual machine consoles. I can’t completely rule out the workstation I was on but it still seemed pretty noticable. Also…be aware that ESXi itself doesn’t have any kind of network/IP checking in it. (Realized too late in the process that two machines had conflicting IPs…the ESXi console made no mention of that) To install the client just simply goto the IP address of the box (listed on the physical server’s console)…a splash page will load with download links to the software.

Thats pretty much it for now. Also, the VMware converter does a nice job of bringing in existing VMs into ESXi. My only complaint is the lack of efficient backup in the product. I realize VMware needs to make money, but I think a basic feature like backup, even in a simple form, should be included. Just having a simple export config and VM option would be fine. Most companies use 3rd party software for the majority of their backup needs anyway. I do feel this is one area that will limit ESXi’s deployment. Microsoft Hypervisor includes stuff like LIVE backup in its product without additional licensing (http://www.microsoft.com/windowsserver2008/en/us/virtualization-consolidation.aspx or so its site claims) which has VMware at an extreme disadvantage. The Infrastructure client is nice, but without backup included it is pretty useless I think.

So theres my results starting out. I failed to mention…my test environment is a Dell Poweredge 1900….running Domain Controller, Exchange 2003, Ubuntu Web/DNS services, File/Print servers and a test WinXP. So far so good.

With that said….anyone else using ESXi in testing or production use? What are your backup thoughts? Please share!

Monday, August 11, 2008

How does VMware ESXi Server compare to ESX Server?

From: http://www.virtualizationadmin.com/articles-tutorials/vmware-esx-articles/general/vmware-esxi-server-compare-esx-server.html?printversion

How does VMware ESXi Server compare to ESX Server?

David Davis photo In this article we explain how VMware ESXi (the “thin” version) and ESX Server (the “full version”) compare to each other and why it is important to know the differences, as a VMware Virtualization Admin.

Introduction

Most of you are familiar with VMware ESX Server as it has been around for so many years. ESX Server offers the “service console” built in and it is a rather large installation (in comparison to ESXi). The latest version of ESXi is “thinner” and lacks the service console. You should note that ESXi is NOT a replacement for the traditional ESX Server but, instead, an alternate version available. In my opinion, neither of these versions is “better” than another. Instead, these two versions are just “different” from one another. Let us learn how these two differ and help you determine which one is best for you.

What are the 10 major differences between VMware ESX Server and ESXi Server?

1. VMware ESXi Server has no service console

The traditional (full) ESX Server has a special built-in virtual machine called the “service console”. This service console is really a modified version of Red Hat Enterprise Linux that is installed and running in every ESX Server by default. The service console has special access to the VMware-proprietary VMFS file system. 3rd party applications can be installed in the service console and Linux-based utilities can be run in the service console. Additionally, VMware includes a number of ESX-related tools in the service console, most of which start with “esxcfg-“ and they are run by accessing the service console with SSH.

As VMware ESXi Server has no service console, there is no SSH access to the server and there are no 3rd party applications that can be installed on the server. However, there are also benefits to NOT having these features (discussed more below).

2. VMware ESXi Server uses RCLI instead of service console utilities

As ESXi doesn’t have any CLI with VMware-related or Linux utilities, VMware needed to provide a CLI interface to ESXi. What VMware came up with is the Remote Command line Interface (RCLI). This is an application that you typically install as a VM and it is used to perform scheduled or ad hock scripting on the VMware Infrastructure. The ESXi RCLI is its own command line where ESX server service console scripting would be made up of mostly Linux utilities.

For more information on how to manage ESXi, take a look at Managing VMware ESXi.

3. VMware ESXi Server is extremely thin = fast installation + faster boot

Because the service console has been removed from ESXi, the footprint in memory has been reduced to just 32MB. In my opinion, it is truly amazing that you can run a hypervisor, allowing you to run virtual machines on your server, with just 32MB of RAM overhead. In comparison, the full ESX Server on disk footprint is about 2GB.

Because the hypervisor is so small, the installation happens in about 10 minutes (or so) and the server boots up in 1-2 minutes. This is quite different from the full ESX server installation and boot, both of which are longer.

4. VMware ESXi Server can be purchased as an embedded hypervisor on hardware

While ESXi is so small that it can be easily installed and can even be booted from a USB Flash disk, what is truly unique about ESXi is that it is being sold by hardware vendors as a built-in hypervisor. That means that, say, you buy a Dell server, ESXi can be built inside the server (embedded) on a flash chip, on the motherboard. There is no installation of ESXi on disk.

5. VMware ESXi Server’s service console (firewall) is configured differently

As there is no service console to protect with the ESX Server security profile (software firewall), the security profile configuration in ESXi is very simplistic. The ESXi security profile configuration consists of a couple of services that you can either enable or not enable with inbound access. Here is a comparison between the two:


Figure 1: ESXi Security Profile – only 2 services


Figure 2: VMware ESX Server (full) Security Profile

For more information on how to configure VMware ESX Server Security Profiles – see my VirtualizationAdmin.com article How to schedule tasks with the VMware Infrastructure Client and ESX Server.

6. VMware ESXi Server has a “yellow firmware console”

Instead of the full ESX Server “service console” boot (which looks like a Linux server booting), ESXi has a tiny “Direct Console User Interface (DCUI)”. Unofficially, I like to call this the “yellow firmware console”. In this ESXi console, all that you can configure are some very basic ESXi server options such as the root user password, network settings, and a couple other items. In the graphic below, you can see why I call it “yellow”:


Figure 3:
ESXi yellow firmware console / DCUI

Because this tiny firmware console (did I mention that it’s yellow?) has so few features, the server is virtually “stateless”. A new server can be configured in seconds because there is almost nothing to configure.

7. VMware ESXi Server has server health status built in

With ESXi some hardware monitoring features are built into the hypervisor. With ESX Server, this is not yet built in. Instead, you must install hardware monitoring software in the service console. For more information on ESXi server health status and how to install vendor-specific utilities to provide similar information on ESX Servers, please see my article: Obtaining server health status in VMware ESX and VMware ESXi.


Figure 4:
ESXi Health Status

8. Some networking features are configured through the service console are not available or are experimental

As ESXi is relatively new and as ESX server has the option to install code for advanced ESX Server features, not all features available in the full ESX Server are also available in ESXi. In fact, I have had issues getting VMware High Availability (VMHA) to work in ESXi. VMHA was not officially supported on ESXi until some recent patches came out for ESXi. Still, even after the patches, I had difficulties with ESXi and VMHA.

There are other ESX Server features that are “experimental” on ESXi. For the full list visit: Differences in Supported Networking Features Between ESX Server 3.5 and ESX Server 3i

9. VMware ESXi Server requires fewer patches and less rebooting

Because the full ESX server essentially has a modified Linux system as the service console, there are many patches that have to be deployed to keep it secure. With ESXi, on the contrary, the server has very few patches that need to be applied. Because ESXi has no service console and it is considered more secure and more reliable. Security, Reliability, and Maintainability, are all major factor when considering a hypervisor.

10. You can buy VMware ESXi Server for as little as $495

With the full version of ESX Server, the least expensive purchase option is the Foundation (Starter) kit for about $1,500, while you can purchase ESXi only (with no support) for $495. On the other hand, if you do get the Foundation kit, you not only get the full ESX Server but also ESXi and a number of VMware Infrastructure Suite options. Still, obtaining ESXi for under $500 allows a server to do so much more than it ever could before.

Which version of VMware ESX Server is best for you?

I am not here to sell you on VMware, on ESX Server, or ESXi Server, what I am here to do is to inform you of the drastic differences between these two versions of “ESX Server”. In my opinion, ESX Server (full) must be used if you have 3rd party apps or if you just want to have access to the “Linux-style” service console.

On the other hand, if you are willing to give up those two benefits, with ESXi, you will get an ESXi Server that boots faster, has fewer patches to deploy, and is more reliable. ESXi is also the least expensive option.

I recommend testing both VMware ESX Server and ESXi server. Both are available for a free evaluation download from VMware Inc.

Conclusion

In this article, you learned about VMware ESX Server the differences between ESXi and ESX Server. Additionally, you learned about how to make the right choice for you. Both of these hypervisors from VMware can be evaluated at no cost.

For more information on VMware ESXi and its architecture, take a look at: VMware.com Whitepaper – the Architecture of VMware ESXi.

For information on ESXi’s features, visit: VMware.com ESXi Features.

iSCSI Initiator Support on FreeBSD 7

Thanks to http://www.cyberciti.biz/faq/freebsd-iscsi-initiator-howto/

Q. How do I install and configure iSCSI initiator service under FreeBSD server?

A. FreeBSD 7.x has full support for iSCSI. Older version such as FreeBSD 6.3 requires backport for iSCSI. Following instruction are known to work under FreeBSD 7.0 only.
FreeBSD iscsi_initiator driver

The iscsi_initiator implements the kernel side of the Internet SCSI (iSCSI) network protocol standard, the user land companion is iscontrol and permits access to remote virtual SCSI devices via cam.
Compile driver

Please note that FreeBSD 7.x has this driver compiled by default. You can skip this step if driver exists at /boot/kernel/iscsi_initiator.ko. To compile this driver into the kernel,
# cd /usr/src/sys/i386/conf
# cp GENERIC ISCSIKERNEL
# vi ISCSIKERNEL
Place the following lines in your kernel configuration file:
device iscsi_initiator
Save and close the file. Building a Kernel, type the following commands:
# cd /usr/src
# make buildkernel KERNCONF=ISCSIKERNEL
Install the new kernel:
# make installkernel KERNCONF=ISCSIKERNEL
Now reboot the system:
# reboot
Install iSCSI Initiator driver under FreeBSD

You need FreeBSD kernel driver for the iSCSI protocol. You need to use driver called /boot/kernel/iscsi_initiator.ko. You can load this driver by typing following command as root user:
# kldload -v iscsi_initiator.ko
Output:

Loaded iscsi_initiator.ko, id=6

Alternatively, to load the driver as a module at boot time, place the following line in /boot/loader.conf:
# vi /boot/loader.conf
# Beginning of the iSCSI block added by Vivek
iscsi_initiator_load="YES"
# End of the block added by Vivek
Save and close the file.
FreeBSD iscontrol command to login / negotiator / control for an iSCSI initiator session

Now, you need to use iscontrol command. First, do a discovery session and exit:
# iscontrol -d targetaddress=iSCSI-SERVER-IP-ADDRESS initiatorname=nxl
# iscontrol -v -d targetaddress=192.168.1.100 initiatorname=nxl
Please note down the list of available targetnames/targetadresses. Once you know the target name, edit /etc/iscsi.conf file:
# vi /etc/iscsi.conf
Append config directives as follows:

officeiscsi {
authmethod = CHAP
chapIName = YOUR-ISCSI-USERNAME
chapSecret = YOUR-ISCSI-PASSWORD
initiatorname = nxl
TargetName = iqn.XYZZZZZZZZZZZZZ # whatever "iscontrol -v -d " gives you
TargetAddress = 192.168.1.100:3260,1 # your iscsi server IP
}

Save and close the file.
Where,

* officeiscsi { : Start config for iSCSI.
* authmethod : Set authentication method to chap
* chapIName : Your username
* chapSecret : Your password
* initiatorname : if not specified, defaults to iqn.2005-01.il.ac.huji.cs:
* TargetName : is the name by which the target is known, not to be confused with target address, either obtained via the target administrator, or from a discovery session.
* TargetAddress : is of the form domainname[:port][,portal-group-tag] to quote the RFC: The domainname can be specified as either a DNS host name, a dotted-decimal IPv4 address, or a bracketed IPv6 address as specified in [RFC2732].
* } : End of config

Start an iSCSI session

The following command will read options from /etc/iscsi.conf, use the targetaddress found in the block nicknamed myiscsi, login and negotiate whatever options are specified, and start an iscsi-session.
# iscontrol -c /etc/iscsi.conf -n officeiscsi
Once you run the iscontrol command it should create a new device in /dev directory. To see the device name run dmesg command:
# dmesg
Format iSCSI volume

Now run sysinstall command to format just discovered iSCSI device name at /dev location:
# sysinstall
Select Custom > 3 Partition > Select iSCSI device name such as da1. Once formatted just mount device, enter:
# mkdir /iscsi
# mount /dev/da1s1 /iscsi
You may also need to update /etc/fstab file:
/dev/ad1s1 /iscsi ufs rw 3 3

Saturday, August 9, 2008

get in shape with little or no equipment:

http://lifehacker.com/400053/get-in-shape-with-little-or-no-equipment

Friday, August 8, 2008

ESXi - [Unsupported] Console Access

ESXi - [Unsupported] Console Access

To access the ESXi console in unsupported mode do the following.

1. Open the console of your ESXi host, you should see a screen that look something like the following ( altered to protect the innocent ):


2. Use the key-combo Alt+F1, and you'll bounce to a virutal terminal (vtty1) with some log messages in it. Though you won't get a response to any characters that you type in here type 'unsupported' and then hit enter.


3. Once you access the unsupported mode, you'll be greeted with a friendly reminder that you shouldn't be accessing the console without the help of your friendly neighborhood VMware support engineer. Enter your root password here and you'll have unfettered access to the console. Some of your old friends are still here like esxtop and esxcfg-mpath, and so are some new ones like esxcfg-locker.



Standard warnings apply here. You really shouldn't be messing around in here if you don't know what you're doing.

Thursday, July 31, 2008

Lol...Very interesting article on people types who will ruin your party...

http://www.holytaco.com/2008/07/29/8-people-who-will-ruin-your-party/

Throwing a party is a lot of work, so it’s a real disappointment when somebody you invited ruins it. Here’s 8 types of people to watch out for before you make your next invite list.

8. Person Who Insists On Cleaning Up Your Party While It’s Still Going On

WHERE YOU CAN FIND THEM: Right in front of you, asking if your drink is finished. Or, methodically moving through the party with a white trash bag and a look on their face as if they’ve been hunting Osama Bin laden for the last 6 years and have narrowed down his whereabouts to somewhere in this party.

WHY THEY WILL RUIN YOUR PARTY: Drinking a beer, much like sex, is far less enjoyable when someone is asking you if you’re finished every five minutes. It’s great that they want to help you clean up, but if you’ve decided to have a party, you’ve already resigned yourself to the fact that when it’s over, your house is going to probably look like the bathroom that Cary Elwes and Danny Glover woke up in, in the first Saw movie. I wonder if these people also decide to wipe their ass in the middle of taking a shit, just to “cut down on the work that has to be done when it’s all over!”

7. GUY WHO GETS WASTED IN THE FIRST HOUR

WHERE YOU WILL FIND HIM: Right by the fridge, bro, cause that’s where all the beer is!

HOW HE WILL RUIN YOUR PARTY: From the moment this guy shows up, everything he says has an exclamation point at the end of it. “This party rules, dude!” “I am ready to party TO-night!” “Let’s shotgun these, bro!” “Tits!” Then, one hour and 13 beers later this guy is incoherent, weaving on his feet and saying stuff like “Paartyyyygjlskdvm…” So, instead of kicking back and hanging out with your friends, you have to spend the rest of the night making sure he doesn’t puke on your couch, piss in your plants or crap on your coffee table.

6. Person Who Only Knows You

WHERE YOU CAN FIND THEM: About two feet to the right of you, standing silently, staring at either you or the person you’re talking to.

WHY THEY WILL RUIN YOUR PARTY: You invited them because during the four and a half minutes a day you talk to them at work, they seem pretty cool and/or really enjoy the impression you do of a fellow coworker. Except as soon as they get to your party, they tense up like Alex Rodriguez’s asshole during a game in October. You have two options at this point, 1) entertain them and include them in every conversation you have the entire night, like they’re your wife or husband even though you probably don’t know their last name, or 2) leave them on their own which leads to them standing in a corner by themselves, staring at you, causing your friends to ask you “I think that dude in the corner is planning on raping you.”

5. GIRL WHO STARTS CRYING

WHERE YOU WILL FIND HER: She’s usually holed up in the bathroom (taking up valuable toilet space) with three of her bestest girlfriends—all three of whom are overweight.

HOW SHE WILL RUIN YOUR PARTY: The worst part is that this girl isn’t crying because her parents just died or she lost a limb. She’s sobbing into a fistful of tissues because she always needs to be the center of attention. If everyone’s not focused on her and all her problems, she just starts crying louder about her job or some lame guy who won’t date her or how fat her friends are. This means you either sit there and let her bring down the vibe of your party or you take her outside and listen to her whine about absolutely nothing. If possible, pair her up with the super wasted guy. She’ll think he’s listening and he’ll think he’s going to score.

4. Person Who Just Got Dumped By Their Girlfriend/Boyfriend

WHERE YOU CAN FIND THEM: In any corner where they were able to trap and force someone to listen to them talk about how they “don’t know what happened,” and how it “seemed like things were fine and then all of a sudden she just said that she thought that we were different people now. What does that even mean? Do you know, because I sure as fuck don’t! I just miss her so much. My name’s Brian by the way.”

WHY THEY WILL RUIN YOUR PARTY: If I wanted people to get depressed as fuck at my party, I’d screen a copy of Schlindler’s list. The problem with these people is, they don’t care who they talk to, and no excuse you give will stop them from talking to you. “Hey, I gotta run to the bathroom,” “No worries, I’ll just wait for you until your done, unlike my EX girlfriend, who wouldn’t wait no matter HOW important it was to go to the bathroom and would just leave you with NOTHING while you were in there.”

3. Creepy Dude Who Tries To Bang Chicks At The Very End Of The Party

WHERE YOU CAN FIND THEM: Towards the end of the party, he’ll be wherever he hears the words “I can’t believe my friends left without me, they were my ride!” or “I’m so (hiccup) fucked up (hiccup) I gotta lay down or something.”

WHY THEY WILL RUIN YOUR PARTY: There’s a reason why this dude waits till the end of the party to try and score; he’s way too fucking creepy to do so when someone isn’t in some sort of desperate situation. Thus, although he’s there because he’s either family, a neighbor, or someone else invited him, you now have to hope to God he doesn’t take advantage of someone at your party, otherwise your party will not be remembered as “That Fourth of July Party at Bill’s house,” and instead be remembered as “that party at Bill’s house where that creepy guy tried to fingerbang Michele while she was puking.”

2. Couple Who Brings Their Baby

COUPLE WHO BRING THEIR BABY: Off to the side, on their knees, pleading with a 6 month old child to stop screaming or right next to you, asking you where he can dispose of a shit filled diaper.

WHY THEY WILL RUIN THEIR PARTY: Nothing says party like the sound of a screaming child and the stench of talcum powder and baby diarrhea! If there was a dude puking, shitting and crying at your party, would you be cool with that? No, you’d either be like “Who the fuck brought this guy?” But if you say that about a baby suddenly that makes you an asshole. Meanwhile, the party sucks becase everyone is being super cautious and attentive to the baby, as if the other 99% of the time that they’re not there the baby is barely eluding death due to unsupervision.

1. THE POLITICS GUY

WHERE YOU WILL FIND HIM: At the beginning of the night he usually stands right next to the front door where he overtly shows off his political button or T-shirt that says something like “Once You Go Barack, You Won’t Go Back” or “McCain = McStupid.” Then, after everyone shows up, he stealthily mingles from group to group while nonchalantly dropping lines like “Did you see what those fatcats tried to pull?” anytime there’s a lull in the conversation.

HOW HE WILL RUIN YOUR PARTY: No one in the history of parties has ever changed their political beliefs based on some asshole screaming about health care reform in the kitchen of a two bedroom apartment. His endlessly tiresome factoids and statistics about how much oil we consume and how the death penalty doesn’t work will make your guests either leave or kill themselves where they stand.

OTHER STUFF YOU MIGHT LIKE:

8 Truthful Celebrity Autobiography Covers

9 College Mascots That Should Be Real

The 8 Places You Probably Lost Your Virginity

Highlights Magazine: The Evil Version

7 Best Paternity Results Reactions

Tuesday, July 29, 2008

Java...fail.

from: http://itmanagement.earthweb.com/entdev/article.php/3761921

The 'Anti-Java' Professor and the Jobless Programmers
By James Maguire
July 29, 2008

When I noticed that this list of the popular programming languages placed Java in the top position, I picked up the phone to call Robert Dewar. Several months back I interviewed Dewar, a professor emeritus of computer science at New York University, about Java’s role in the college classroom.
What he said in that interview about Java in the classroom wasn’t pretty.

In essence, he said that today’s Java-savvy college grad is tomorrow’s pizza delivery man. Their skills are so easily outsourced that they’re heading for near-term obsolescence.

Dewar stresses that he’s not against Java itself. But the fact that Java is taught as the core language in so many colleges is resulting in a weak field of computer science grads, he says.

The reason: students’ reliance on Java’s libraries of pre-written code means they aren’t developing the deep programming skills necessary to make them invaluable. Colleges, alarmed by falling CS enrollment, have dumbed down the course requirements. Consequently, CS majors sail through a curriculum of Math Lite, earning a smiley-face on their papers for “developing” projects using pre-built libraries.

In the end, they graduate with a diploma whose value is questionable. They may be equipped for a dynamic career in fast food delivery, yet they are not fully prepared to compete against what is now a global field of rigorously educated software developers.

But What About the List?

But wait a second, Professor Dewar. (Actually, Dewar is both a professor and a CEO. He co-founded AdaCore, whose clients include Boeing and Lockheed Martin, so his experience includes decades in private industry.) I wanted to ask him, since this list of popular programming languges puts Java at No. 1 – ahead of biggies like C, C++ and Visual Basic – doesn’t that negate his theory?

I mean, if Java is this popular, maybe universities should teach it first. It called “being in touch with the real world,” isn’t it?

“This list is pretty meaningless in my opinion,” he says. “Using YouTube and Google to measure popularity just means that you pick up the buzz factor. Many serious application developers are not even present on the Web, which tends to overemphasize academic and hobbyist views. As the list itself says, this has nothing to do with quality of languages or level of usage.”

“Furthermore, Java is mainly used in Web applications that are mostly fairly trivial,” Dewar says, with his characteristic candor. “If all we do is train students to be able to do simple Web programming in Java, they won't get jobs, since those are the jobs that can be easily outsourced. What we need are software engineers who understand how to build complex systems.”

“By the way Java has almost no presence in such systems. At least as of a few months ago, there was not a single line of safety-critical Java flying in commercial or military aircraft. I recently talked to a customer who had a medium-sized application in Java, which was to be adapted to be part of a safety-critical avionics system. They immediately decided that this meant it would have to be recoded in a suitable language, probably either C or Ada.”


Robert Dewar (Ada, by the way, is down at No. 19 in the list of popular programming languages.)
Dewar says he has been deluged with emails supporting his view that computer science programs must move beyond – far beyond – focusing on Java.

“One was quite interesting,” he says. “It was from a software/hardware company in the Valley. The writer said that at the end of ads for software engineers, they added the sentence ‘This job will not involve any use of Java, or any Web-based application programming’, and that this single sentence was enough to essentially eliminate American applicants for their jobs – which was their idea; they felt they had wasted too much time interviewing incompetent college graduates.”

--
Questions for New CS Grads

Dewar says that if he were interviewing applicants for a development job, he would quickly eliminate the under-trained by asking the following questions:

1.) You begin to suspect that a problem you are having is due to the compiler generating incorrect code. How would you track this down? How would you prepare a bug report for the compiler vendor? How would you work around the problem?

2.) You begin to suspect that a problem you are having is due to a hardware problem, where the processor is not conforming to its specification. How would you track this down? How would you prepare a bug report for the chip manufacturer, and how would you work around the problem?

“I am afraid I would be met by blank stares from most recent CS graduates, many of whom have never seen assembly or machine language!” he says.

Lest he go too far, Dewar stresses that there are indeed some graduates who are unquestionably well prepared.

“There are a couple of top schools where I think the students come in knowing a heck of a lot and they leave knowing even more,” he says. “Places like Carnegie [Mellon] and MIT – those are not dummies who come out of those schools, by any means. So my comments don’t talk about everyone everywhere.”

Anxiety Tremors

To look back a few decades, universities once focused on programming languages that lent themselves to greater intellectual rigor, in Dewar’s view, like Fortran and Pascal.

But with the tech revolution of the 1990s, a blizzard of change swept through university CS departments.

“I can relate what happened at NYU and I think it’s probably pretty typical of many places,” he says. ”So we’re sitting around, and we ask, ‘What language should we teach?’ And it was “Oh, we’d like to teach Java.’ Now no one around the table actually knows Java. But they’re sure they want to teach it because it’s an upcoming language that the industry’s gonna use, and everyone will be doing everything in Java.”

“And it sort of swept the field – pretty quickly. It swept away Pascal. At that time there were about 200 universities teaching ADA as a first language in the U.S. And a somewhat smaller number teaching C and C++. And it largely swept those away.”

Java as a core teaching language is now universal. “A good indication is that the [college placement] AP class is exclusively Java. Used to be C and C++. So Java has a really dominant place in the university curriculum.”

As the sunny 1990s gave way to the troubled 2000s, two seismic shifts hit the software industry: the dotcom bust and a steady flow of outsourcing headlines. Both factors helped turn a healthy crowd of CS students into a comparatively smaller cohort. Enrollment trended ever downward. Academic deans felt anxiety tremors.

Here in 2008 the clouds are dark. “Everyone is desperately worried about the dropping enrollments – it’s dramatic,” Dewar says.

“We had 650 [NYU] undergraduate students in advanced courses, it’s now less than 300. A huge change. And you’ll find that repeated across the country, it’s not isolated,” he says. “ You can imagine, if suddenly half your students disappear, then your budget gets under extreme pressure. The dean is unhappy if he sees that happening.”

“These are market economies in most universities – no students, no faculty money, etc, etc.”

In response, colleges have compromised – heavily – to attract students, Dewar explains. “So two things: reducing requirements and getting rid of annoying math courses and things like that. And also trying to make courses ‘fun.’ I believe that computer science should be fun, but the fun should come out of solving problems – not making pretty pictures. That’s the danger, I think.”

The situation has the potential to turn into a vicious circle: Enrollment is down, so CS programs lower requirements. This in turn creates more CS grads who are replaced by outsourcing. As a result, news of this outsourcing keeps driving down CS enrollment – and the spiral continues.

--
Solutions (And a Ray of Hope?)

If it’s true that CS curriculums need to be improved, to be bulked up and made more in-depth, does Dewar foresee any improvements on the way?

“I don’t know,” he says. “We got a fair amount of interest going. And a nice thing that’s happening is that there’s going to be an ACM [Association of Computer Machinery] point-counterpoint, with me writing the point and some guy from some other university writing the counterpoint on this whole issue.”

“I just like to keep it as a topic of discussion. I know it strikes a chord among many university people, too. Part of the trouble with universities is that there are relatively few faculty members who know much about software. They know about the theory of computer science and the theory of programming languages. But there are relatively few faculty who really are programmers and software engineers and understand what’s involved in writing big applications.”

“It’s just not the kind of thing that universities are into, really. Because they tend to regard computer science as a scientific field rather than an engineering field. So I’ve always felt that was a weakness.”

Part of the problem is that programming is hard to teach. “Programming is a mixture of a highly technical skill and an aesthetic art. And that’s a very difficult combination.”

Dewar sees at least four ways to better educate programmers:

• More one-on-one mentoring “My most successful teaching of programming was when I worked one-on-one with people,” he says. Of course that’s difficult at the university level, with a teacher-student ratio of 30 to 1, or 90 to 1.

• Read a whole lot of good code “One critical way of learning programming is to read a lot of code written by really good programmers. Most students don’t get that opportunity.”

• Work in Groups “I would like to see much more in terms of group projects. Now they’re hard to grade, and grading stands in the way of education, often – and this is one of those ways. It’s the same problem a manager faces, really understanding how much everyone has contributed.”

• Realize that “copying” code has value “It’s interesting when you think that the message that we give to students is: ‘You must do this all on your own, you mustn’t borrow anything from anyone else.’ And then we put them in a real industry situation and the message suddenly turns to, ‘Reuse code as much as you can.’ Real life programmers get good at using chunks of other people’s code.

While those may all be good suggestions, Dewar’s voice alone isn’t enough to produce change. As he sees it, CS departments need to light a fresh fire.

“I’ve got all these people saying ‘Yeah, Yeah, Yeah,’ but that’s not good enough to say ‘Yeah, Yeah, Yeah’ – you have to do something.”

“One obvious thing is that we need to get much more industry presence in the ACM curriculum discussion, because that’s a real focus. ACM has a real influence over curriculums. Each year they produce a recommended computer science curriculum. So that’s a real entry point.”

One obstacle: “The inertia is huge. So many members don’t really want to learn new stuff, particularly.”

Still, amid his doubts, Dewar believes that a bright, well-trained CS grad can have a good career.

“My feeling is, it’s not a field where any idiot will be able to get a high paying job. Which at the height of the dotcom thing, any idiot could get a high paying. But competent, well-educated students will be able to find jobs without problem. I think that’s a fairly widely held view.”

--

Gross.

How to Run Injury-Free By Jeff Galloway

How to Run Injury-Free
By Jeff Galloway
For Active.com
June 13, 2007


One of my proudest accomplishments is being free of overuse injuries for almost 30 years. Below you will find the risks and the ways to avoid them.

My advice comes from working with over 200,000 runners in Galloway training groups, one-day running schools, Tahoe retreats, e-coaching and individual consultations. As the runners send me the results of my suggestions, I adjust the training and rest schedules. The current injury-free program is listed below, but I continue to look for better ways of avoiding problems and reducing downtime.

Fewer days of training per week

Those who run three days a week have the lowest rate of injury. I believe that almost all runners, except for Olympic candidates and world record aspirants, can be just as fit and perform as well running every other day. This may involve two-a-day workouts and more quality on each day.

Having 48 hours between runs is like magic in repairing damage. Those who insert a short and slow jog on recovery day (junk miles) are not allowing for complete recovery. When a client complains about lingering aches and pains, I cut them back to every other day and the problems usually go away.

Go slower on the long runs

After 30 years of tracking injuries during marathon training programs, I've found that most are due to running the long ones too fast. You can't run the long ones too slowly -- you get the same endurance whether you go very fast or very slow. Slow running will allow your legs to recover faster. The fastest that I want our Galloway Training groups to run is two minutes per mile slower than goal pace. Many run three or four min/mi slower and experience very fast recovery. Be sure to slow down as the temperature increases: 30 sec/mi slower for each 5 degrees of temperature increase above 60 degrees Fahrenheit.

More walk breaks

The continuous use of any muscle used the same way, increases fatigue more rapidly. Continuing to run continuously, with fatigued muscles, will greatly increase the chance of injury. You'll see on my Web site the recommended frequency of walk breaks, based upon pace. If you have aches and pains already, it is best to walk more often, from the beginning, than is recommended. The most important walk breaks are those taken in the beginning of the run, for these can erase all of the fatigue. Walk breaks will also tend to produce a faster time in all races from 5K up. The average improvement in a marathon among those who've run several without walk breaks is 13 minutes faster by taking the strategic walks.

Don't stretch if you have an ache, pain, or injury

Stretching a tight or injured muscle or tendon will increase the damage dramatically. Even one stretch will produce tears in the fibers, resulting in a longer recovery. Stretching a muscle that has been tightened by running can injure it within a minute. Massage is a great way to deal with the natural tightening produced by running. The tightening is mostly a good thing, allowing you to run more efficiently.

Be careful with speed training

Speed workouts produce a lot of injuries. You can reduce the odds of this happening by warming up very well, doing a few light accelerations as described in my books Testing Yourself, Year-Round Plan, Half Marathon and Marathon. Other important injury-reduction factors are the following walking more between each speed repetition and staying smooth at the expense of time. Don't strain to run a certain time. This is most important at the end of a workout.

Never push through pain, inflammation or loss of function

If you experience one of the above, stop the run immediately. Continuing to run for another block or another lap will often produce multiples of damage requiring weeks or months off for repair -- instead of days.

For more information, see Jeff's books Marathon, Half-Marathon, Running -- A Year Round Plan, Walking -- The Complete Book and Galloway's Book on Running, 2nd Ed. These are available, autographed, from www.RunInjuryFree.com. Join Jeff's blog: www.jeffgallowayblog.com

Healty diet foundations...just add meat. ;)

Snagged this from zenhabits:
http://zenhabits.net/2008/07/the-building-blocks-of-a-super-healthy-diet-with-a-sample-meal-plan/
--

The Building Blocks of a Super Healthy Diet (with a sample meal plan)

Most people know how to eat healthy, and know that they should — it’s just that when it comes down to implementing this knowledge, there’s a bridge that needs to be crossed from knowledge to action.

How do you actually eat healthy, instead of just knowing that you should eat healthy?

Create a meal plan, constructed with super healthy foods that you enjoy eating.

Now, there are three parts of that solution, if you look closely, and all three parts are equally important:

1. Create a meal plan. Without this, you’ll just know what to eat, vaguely, but you need to actually make a plan and implement it (meaning, go shopping for the foods in the plan and actually cook the foods and eat them).
2. Super healthy foods. A meal plan without this doesn’t get you to where you want to go. Build your meals around stuff that’s really good for you. You can add other stuff, of course, but the super healthy stuff should be the majority of the food.
3. Food you really love. This is key. If you don’t enjoy the foods, you won’t stick with the plan for long. No one can eat food they don’t enjoy for more than a month or so (usually less). It’s why most diets fail — anyone can stick with a diet for a couple of weeks, but if you feel that you are suffering by eating it, you’ll fall off it after a little while. Instead, make sure you love your food. Add variety, of course, and mix up the plan every few weeks, but stick with foods you love.

Given those simple components, the solution doesn’t seem so hard, does it? And with a super healthy meal plan like this — one that you love — you can pair it with some exercise and get healthier than ever.

What follows are some of my building blocks. They aren’t the only possible building blocks, and you shouldn’t use them exclusively, but they’re a good starting point for anyone. Below those building blocks are some sample meals you can use, but only if you love these foods like I do. Instead of following it exactly, use it as a starting place, as a few ideas you can use to construct your own meal plan — with foods you love, not ones that I love.

Super Healthy Building Blocks

Spinach and other greens. Spinach is my favorite of the greens, but other good ones include kale, bok choi, collards, dark green lettuce (skip iceberg), and other similar greens. Try to build a couple of your meals around these greens, as they are high in fiber, vitamins and minerals. And best yet: super low in calories. You can eat a whole plate of greens and while they can fill you up, you couldn’t possibly get fat on them (unless you added a bunch of butter or fatty dressing or something like that).

Avocadoes. I love these things. Full of good fats and good flavor, avocadoes are perfect for salads, sandwiches, wraps and more.

Tomatoes. There are other good fruits and veggies, but tomatoes are one of my favorites, not only for their nutritional content but because of the flavor they add to any dish — salads, sandwiches, pastas, soups, anything.

Fruits. Don’t worry about their “carb content”. Fruits are incredible snacks, because they are filled with fiber and vitamins but are low in calories. I eat lots of apples, oranges, bananas, mangoes, pears, grapes, melons. I like to get a big back of small apples and just munch on them whenever I’m hungry. I also add fruits to all kinds of uncooked meals, chopped up or as a side dish.

Berries. They’re fruits, but they’re so special to me that I add them as a separate item. I absolutely adore berries. They are like a dessert to me, eaten cold and slowly and with my eyes closed. I add them to cereal, yogurt, smoothies, desserts, oatmeal and more … and of course just eat them by themselves.

Nuts. Full of fiber and good fats and protein. I like to chop them up and put them in hot cereal or salads or stir frys, or just eat them raw and whole as snacks (almonds are my favorites). I also enjoy almond butter instead of peanut butter (although I eat both).

Beans. Great sources of fiber and protein, low in calories, you can eat beans all day long. I like them in chili, soups, tacos and more. Get a variety — red, black, pinto, white, lentils.

Whole grains. This is a broad category that includes all kinds of cereals, breads, wraps, brown rice, pizza dough, and more. Try to go for as much whole grain as possible — if you see “wheat flour” or “enriched wheat flour” it’s not as good. I especially like sprouted grains, such as Ezekiel sprouted bread or English muffins or cereals. Oatmeal is good (avoid instant) as is muesli.

Olive or canola oil. You need fats, but they should be the good kind. Avoid saturated, although a little saturated fat is fine. I usually use olive oil or canola oil, although there are other good ones too. Again, nuts and avocadoes also provide good fats. I also use ground flaxseed on lots of things for fiber and good fats.

Lean protein. As a vegetarian, I eat lean vegetable protein — lots of soy protein and beans and nuts. Whole grains also contain protein, as do other veggies. It’s not hard to meet your daily requirements, even with lots of exercise raising your requirements. However, if you’re not vegetarian, fish and lean poultry are best, and lean red meat can be included if you don’t eat too much of it. Note: Please, let’s not get into another debate about soy protein or meat! Let those sleeping dogs lie.

Lean calcium. I try to stick to soy sources, but that’s not necessary for good health. However, try to stick with lower-fat versions, as whole dairy can have too much saturated fat. Lower-fat milk, yogurt, and cheese are good choices. Soy milk and yogurt are great because they are very low in saturated fat.

A Sample Meal Plan

This is not something you should just adopt wholesale, without making changes. In fact, if these are foods you don’t like, ditch the whole thing, but use it just to get an idea of what you can do. These are foods I love to eat, but you should choose your own.

Also remember that I’m not a dietician. I’ve run these meals through online calculators, and most of the time you’ll get plenty of all the things you’ll need, from protein and healthy fats to the major vitamins and minerals, including calcium and iron. But don’t take my advice as the advice of an expert.

Each day, you would choose one of the meals from each category (more from the snacks), or mix them up if you like. Be sure to get a variety, and change the options every few weeks or so.

Breakfasts

1. Hot oatmeal (using rolled oats) with chopped fruits or dried fruits, flaxseed, and/or berries.
2. Kashi cereal with soymilk and berries or other fruits.
3. Sprouted grain toast with almond butter, chopped fruits on the side.
4. Scrambled tofu with tomatoes, mushrooms, spinach, onions. (Try this recipe).
5. Fried brown rice — fry up with olive oil, onions, mushrooms, green veggies, tofu, soy sauce or tamari sauce. You can throw in some corn or carrots or other veggies.

Lunches

1. Veggie sandwich or wrap. Can have tomatoes, spinach or other greens, avocadoes, hummus, bell peppers, maybe some dijon mustard and/or Veganaise. Any combo that works for you. On thick whole grain bread or whole grain wrap.
2. Whole wheat pita with hummus. Add tomatoes and raw spinach and sprouts.
3. Veggie burger. Gardenburger is my favorite brand. On a sprouted grain bun, with dijon mustard and ketchup and maybe a touch of Veganaise, lots of veggies (greens, sprouts, tomatoes and avocadoes are my favorites). Add some homemade sweet potato fries (use olive oil and a little salt) if you’re feeling decadent. These fries also go well with the sandwich or wrap.
4. Amy’s Kitchen lunches. For when you’re lazy or in a hurry. Amy’s Kitchen has a whole variety of fairly healthy, vegetarian lunches made from whole foods. Very little processed stuff. The only weakness is that it’s usually high in sodium, but if the rest of your day is low in sodium (as most of these dishes are), then that’s not a worry.
5. Big salad. I like to use spinach or other greens, tomatoes, avocadoes, feta cheese, nuts, maybe some chopped fruit or berries, and a little bit of light vinaigrette (Newman’s Own is my favorite).
6. Leftovers from dinners or fried brown rice (see breakfasts)

Snacks

1. Fruits.
2. Chopped veggies. Carrots, broccoli, edamame are some of my favs. Dip in hummus if you like.
3. Nuts. Almonds are my favorites.
4. Protein shake. Good after a strength workout. I use soy protein, although whey is also a good choice, along with soy milk, frozen berries, banana and ground flaxseed.
5. Clif Bar. Good for before or after a workout (or during a really long workout, for that matter). My favorites are apricot or cranberry apple cherry.
6. Yogurt with berries or fruits and nuts.

Dinners

1. Tofu veggie stir fry. Just stir fry some onions, cubed tofu, and chopped veggies — various greens such as kale or bok choi work well, as do broccoli, bell peppers, carrots, anything really. Add some soy sauce or tamari, black pepper and anything else you’d like to add — nuts, sesame seed oil, ginger, garlic, a little honey all work well in different combinations. Serve over brown rice if you like.
2. Tacos. Some low-fat refried beans and/or black beans on soft corn tortillas with salsa (try Newman’s Own salsa or Amy’s), greens, tomatoes, maybe corn or even some Sour Supreme.
3. Chili. Here’s my veggie recipe. Great with brown rice or corn bread or on its own.
4. Spaghetti or other pasta. Cook any kind of pasta you like. Cook some onions with diced tomatoes and bell peppers and some tomato sauce and basil. Add some fresh Parmesan if you like. For a meatier version, cook some veggie “ground beef” (Bocca or MorningStar) with onions and then add some pre-made pasta sauce.
5. Homemade pizza. Get a pre-made whole-wheat pizza crust, add some pre-made spaghetti sauce, and then any chopped veggies you like, brushed with olive oil. Kale, broccoli, spinach, mushrooms, tomatoes, bell peppers all work great. Add some grated fresh cheese if you like.
6. Leo’s fabulous veggie soup. Simple awesome. Here’s the recipe. Will last you several days, even with a ridiculously large family like mine.