Tampilkan postingan dengan label computers. Tampilkan semua postingan
Tampilkan postingan dengan label computers. Tampilkan semua postingan

Kamis, 13 Oktober 2011

The R. in K. & R. is no more.


Dennis Ritchie is dead at the age of 70.

Who the hell is Dennis Ritchie, you ask?

He co-developed Unix.

He developed the language C.

With Brian Kernighan, he published the definitive manual on C, known to nerds the world over as K. & R. It was so cleanly written, they could have taught Strunk and White a thing or two.

In computers, Big Damn Deals don't get much bigger.

Click here for the New York Times obit.

Best wishes to the family and friends of Dennis Ritchie, from a fan.

Minggu, 20 Maret 2011

Sunday Numbers 2.0, Vol. 5: Sorting animations.

As Donald Knuth said, "An algorithm must be seen to be believed." In some browsers, you can click on the pictures to watch an animation of some famous sorting algorithms.



Here is a video from The You Tubes of heapsort. This is a link to another animation of Heapsort, which puts in a heap sorted backwards, then takes the big values at the front of the line and moves in in exact order into the back of the line.




Here is a YouTube selection for Quicksort. Note that some of the lines are green, which means in the proper position, and some are in blue, which means not yet perfectly sorted. While the project appears to be try to set things up from left to right, you'll notice very early on a green line This is a link to another animation of Quicksort, which picks a single value, puts it in the proper position, with everything smaller than the value in front of it and everything bigger after it. This effectively splits the data set into two parts to be sorted yet again. This is called a divide and conquer algorithm.

My friend Ken sent me a link to a bunch of animating in place sort algorithms. These include Heapsort and Quicksort, as well as merge, bubble, shell and others.

Thanks to Ken. Fun stuff, if you like that sort of thing.

(Nerd puns. Tee hee!)

Senin, 17 Januari 2011

So, what CAN'T a computer do better than a human brain?


Much is being made of a recent project from IBM called Watson*, a computer trivia program that is set to compete with top players on Jeopardy!, the show to be aired in the middle of next month. The machine beat top champions Ken Jennings and Brad Rutter in a short practice which can be viewed already.

As a computer programmer and a former Jeopardy! champ, I am very impressed with this accomplishment.

It's nothing at all for a computer to have a massive amount of data in storage and the ability to access it at literal lightning speed. The great accomplishment here is the ability understand a sentence in spoken English a person has made intentionally tricky by employing homonyms, puns and other word play. English is by far the language with the most words of any used by humans, roughly twice the size of any other. If the data set is correctly formatted, that doubling of size means searching for words might take ten superfast decisions instead of nine.

But consider the word bat. Are we talking about the flying animal or the piece of wood used in baseball? Don't forget that it's also the name for the piece of wood in the game cricket, and in British usage, a ping pong paddle becomes a tennis table bat. When combined with the adjective "old", it's probably not a flying animal or a piece of wood used to hit a ball, but instead a somewhat outdated piece of slang for a disagreeable older woman.

"He was disgusted when the old bat batted her eyes." There are two ways this can be disgusting, one much more likely than the other. How do you fill a computer with all the possible permutations of word play? What about an audio Daily Double or a video Daily Double? We are used to pulling the human voice out the many sounds in a song. How well can a computer do that?

*As you might have already guessed, this program Watson is named for Thomas Watson, the man who in 1924 renamed Computing Tabulating Recording Corporation to International Business Machines and became the president of the newly named company, which would dominate the tabulating machine industry for many decades to come.


IBM is building on a track record of making software that excels at brain games. Their greatest previous victory was the chess software that defeated legendary world champion Garry Kasparov in a six game match in 1997 by compiling a record of two wins, one loss and three draws. When it comes to speed chess, computers have dominated humans for decades, but this set of matches was played using the regulation time limits for the top professional tournaments, two hours a piece for each player to complete 40 moves and if the game is still undecided, the position is sealed and play begins later with less times allotted. Kasparov wanted a rematch but IBM refused and accusations of cheating were thrown around. Still, the final score was Deep Blue 2.5, Kasparov 1.5, and it is still considered a watershed moment in the history of software development.


On the other hand, there are some brain games that do not have particularly good software opponents available. Most notably the great Asian game known as Go in Japanese (Weiqi in Chinese and Baduk in Korean), a game whose rules are somewhat simpler than chess since pieces never move once put on the board unless they are captured. Many fans of Go say it does not have a good algorithm a computer can follow because it is so much more subtle than chess, but it seems more likely that the problem of making a strong computer opponent lies in the fact that no one has decided to put in the resources necessary to develop such a program. Go is a great game and very subtle, but it is nowhere near as subtle as understanding the spoken English language, and Watson has shown it can do that remarkably well.


As for great games that also involve the element of chance, some have been the focus of very intensive software research and others have not. A computer backgammon program beat the World Champion Luigi Villa back in 1979, and by using backgammon software to analyze positions exhaustively, some players consider the game close to "solved", such that the best plays are known and it just comes down to luckier dice.

On the other, bridge software is still in its infancy. Again, I am willing to concede bridge is more complex than backgammon, but I don't think bidding and playing bridge properly is as tough as understanding natural language, especially natural language where word play is the norm instead of the exception.

Senin, 23 Agustus 2010

Yet again, hating on the Mac.


Yesterday, the Yahoo! fantasy football league run by my nephew Adam had its draft, and that was an enjoyable way to spend a couple hours. The Mutant Mercenaries drafted first, so I have last year's best running back Chris Johnson on my team, and I am also happy with several other picks. What I am not happy with is how the software that ran the draft worked on my Mac.

I used my usual browser Firefox, and of course it let me choose players and sort through the data in several ways, but there was a chat window that had no accompanying text box, so I could could read the stuff other people were writing, but could not comment myself. It's possible another Mac browser would have worked better, but this is just another way my Mac does not give me options that were readily available on even the most out of date PC that will connect to the Internet.

Grr.

p.s. I will keep a sidebar up on this blog showing the progress of the Mutant Mercenaries this year. My first game is two weekends from now against my nephew Adam's team, Condoms R 4 Sailors.

Sabtu, 14 Agustus 2010

Don't buy a Mac.


Yes, I'm an old fart, but I'm a tech savvy old fart. Yes, I bought a Mac when it had 128k of RAM. Yes, I figured out that an external hard drive was NOT a luxury but a necessity. Even so, in the early 1980's, Macs were better than PCs and the ideas that moved the personal computer forward were almost all from Apple and later stolen by Microsoft.




That was then, this is now. Back then for example, the San Francisco 49ers were the best franchise in professional football. Nowadays, not so much. Things change.

Don't buy a Macintosh computer. I bought a Mac Mini earlier this year, and it's a mistake I can't afford to fix, so I'm stuck with it for awhile.

I expected less crashes, but I've already had several bad freeze-ups when using the Internet, so I don't see a big improvement in terms of software reliability or speed. The only plus so far is that I've had no issues with iTunes like I did on Windows based platforms.




The software isn't as good. For example, I was really getting good with the latest version of Excel on the PC before my old computer gave up the ghost. There are a LOT of useful features on the PC version of Excel the programmers at Microsoft decided users of Macs didn't need. I know that means people at Microsoft are being dicks, but if you own a Mac, you are the one who suffers.



The command key makes your life worse. If you buy software specific to the Mac, anything that will be Ctrl-C in other software will be command-C instead. So far, so good. The problem is that a lot of the software I use is designed to be used on the 'Net, and some Netware understands the command key and other Netware only understands the control key. The software I use to write my blog posts understands the command key in some instances and the control key in others. Really annoying and a time waster.



And whatever you do, don't buy a Magic Mouse. It looks cool, it means less wires to get tangled, I thought it was a win-win when I was at the Apple Store.

IT SUCKS UP BATTERIES WORSE THAN A WALKMAN USED TO.

I'm keeping track of battery usage with this piece of crap. The first set of batteries lasted exactly one month. The second pair crapped out this morning, so they lasted three weeks. Even when you put fresh batteries in, it will take a while before the computer reads the connection to the mouse consistently.

It pains me to write this. I had expected a much better experience than this with my new computer. I like the Mac ads and seriously dislike the PC/Microsoft ads going back for years if not decades.

I'm not a Mac. I'm not a PC. I'm a human being and more importantly in this case, I'm a human being who has written software and knows how it's supposed to work. Using a computer shouldn't this much of a struggle in 2010. A lot of people are realizing the "nice" tech companies like Apple and Google are becoming just as evil as Microsoft as they get bigger. Most people who whine about Apple are hating on the iPhone. Let me start a trend of hating on their computers, both the dumbed down software and and glitchy hardware.