Unless there is some ultra-low-heat version of the Atom chipset, an Atom tablet will need a cooling fan, and cooling vents. Part of the tablet will get warm and warm air will vent out one side. And this means that battery life is being wasted, converted to useless heat. Bigger, heavier, clunkier, and less battery life. Lose/lose/lose/lose. And your major advantage of the Atom is that it runs off-the-shelf Windows (or Linux) but off-the-shelf doesn't take good advantage of a touchpad; you are better off with something like Android.
I don't know if HP will put Palm's WebOS on their first tablet, or take the conservative choice and just do another Android tablet. I'm no marketing guy, but I just don't see much cachet in the WebOS; if you want to advertise lots of apps and a nice app store, Android would be the way to go. It's good for everyone (except Apple and Microsoft) if Android becomes a very standard platform with lots of units in the field to build a market segment that wants Android apps. (Right now if you are an apps developer, it's pretty much a given that you need to support iPhone... and maybe you don't even bother to support anything else! I'm hoping that the Android will become at least an equal target for apps, if not bigger than iPhone.)
On the other hand, would HP pay 1.2 billion dollars just to get Palm's expertise and staff? HP must have some sort of plans for WebOS. Which argues that they are likely to go with WebOS on their new tablets. But I don't see how they can turn that into a sales advantage. ("We have an OS nobody else has... it's exclusive!" sounds better than "You can't use the Android app store apps on this platform" but they mean the same thing.)
Intel doesn't really want the Atom to improve. They don't want to give up any of the Atom sales to AMD, but what they really want is for everyone to buy more-expensive and more-upscale Intel CPUs such as Core Duo or i5.
Their problem is the Tegra 2. This is an 8-core chip that draws tiny amounts of power and yet is overall more powerful than the Atom. For half a Watt or less, you get an ARM 7 core (probably for "housekeeping"), two ARM 9 cores clocked at 1 GHz (with out-of-order execution and dual issue) for data processing, audio and graphics accelerator cores, video encode and decode cores, and an image processing core that can support a camera. This thing can decode HD movies in real time without even using the ARM 9 cores for anything!
The Apple iPad uses the Apple A4 chip, which is believed to be basically an ARM 8 core at 1 GHz. ARM 8 means no out-of-order or dual issue. So the iPad has a single 1 GHz core and a graphics accelerator, and it can already give a pretty good user experience; just think what people can do if they get multiple cores all working at once with the Tegra 2.
The Tegra 2 plus Android (and plus a Pixel Qi screen) is the combination to watch. Microsoft can't be happy; they want everyone to license the mobile Windows stack, but Android is both compelling and free, so that will be hard to compete with.
Intel can't be happy, because they have no way to keep the Tegra 2 from eating into the Atom market share. "Smartbook" computers and tablets will be better with a Tegra 2 because they will dissipate less heat (no need for a cooling fan) and use less battery life while getting more work done than is possible with an Atom. It's win/win/win, but you can't get it with Windows 7, you need mobile Windows or Linux, and it's going to be Linux (Android).
If Intel made a dual-core Atom on the 32 nanometer process, with an appropriately low-power chipset, not only would it go into netbooks but companies would start making desktop computers out of it. Why not? Get an "Energy Star" logo in the USA and sell them as "green" corporate computers or thin clients. Performance wouldn't be quite as good as a Core 2 Duo, but more than good enough, and Intel would be making less money because the margins are thinner on the Atom. Intel won't want that... (Remember Intel putting limits on how good a netbook can be? Screen can't be too big or touchscreen, can't have too much RAM, etc. Intel is trying to protect the market position of their mobile processors above the Atom.)
This guy sounds like a desperate market speculator that has no clue how the market works... etc etc etc
Whereas you sound like you didn't even read TFA. Or if you did, you don't understand it. Let me break it down for you.
TFA says that there will be relentless downward pressure on computer prices from now on. This point is unassailable.
I can buy a Compaq laptop with a dual-core AMD chip, a great 15.6" display, big hard disk, a DVD drive, and lots of RAM, all for about $400, quantity 1 retail. (Or $370 on sale at Fry's.) I can put Ubuntu on it, and the result is nearly as nice as an Apple laptop. Checking apple.com, I see that I can buy a 13" MacBook for $1000, or a 15" MacBook Pro for $1800. No question, the Apple notebooks are nicer: they have that nifty magnetic power cord, they have slot-loading optical drives, they have the great unibody aluminum chassis, etc. But I have to tell you, if I'm spending my own money, it's going to be that $400 computer, or even a $250 netbook with a 10.1" screen. Does a 13" MacBook really offer me four times the value of a $250 netbook?
TFA says that in the future, Apple is worried that it will be forced to cut their prices and sell at low margins, because the entire PC industry will be forced to cut prices and sell at low margins. I don't see much to debate here either. Here is a quote from TFA:
PCs are becoming commodity items. The price of PCs and laptops is falling by about 50% per decade in real terms, despite performance simultaneously rising in real terms. The profit margin on a typical netbook or desktop PC is under 10%. Apple has so far survived this collapse in profitability by aiming at the premium end of the market -- if they were an auto manufacturer, they'd be Mercedes, BMW, Porsche and Jaguar rolled into one. But nevertheless, the underlying prices are dropping. Moreover, the PC revolution has saturated the market at any accessible price point. That is, anyone who needs and can afford a PC has now got one. Elsewhere, in the developing world, the market is still growing -- but it's at the bottom end of the price pyramid, with margins squeezed down to nothing.
Is that clear enough for you? PCs aren't going away, but the traditional PC profit margins are going away, and this will cause a shakeup in the PC manufacturing industry. Apple has, so far, managed to make higher margins than the typical 10%, but how long can they continue this?
And what do you know, Apple has successfully set up a whole ecosystem where consumers must go through the Apple App Store to get applications, and Apple collects a 30% cut. TFA says that Apple would do almost anything, maybe even give the hardware away, to get all their customers locked into such an ecosystem.
In short, TFA doesn't say that PCs are going away. It says that PCs are going to be cheap, fast, and ubiquitous, and that companies selling PCs will be forced to accept slim margins. And Apple really doesn't want to play that game. Remember how Steve Jobs dissed netbooks? Apple doesn't want to sell a netbook, or even an iPad, for $250; and the market won't let them get away with selling a netbook for $500. The actual problem Steve Jobs has with netbooks is the razor-thin margins. So far, the market will allow Apple to charge $500 and up for an iPad (although I don't think that can last forever either; great iPad competitors ).
Maybe the article is far-fetched. But if Steve Jobs thinks he has any chance at all of locking all of Apple's customers into an App Store ecosystem where Apple skims 30% of all the action, you better believe he will go for it.
When will the studios ever figure out that the DRM isn't stopping piracy at all, and only hurts the honest customers?
It's a bitter irony that the pirates offer a better product: it will play in any player (no DRM), it probably doesn't force you to watch an "FBI warning", it probably doesn't have a commercial about how evil it is to pirate things, and it probably doesn't have endless trailers for other discs.
And it seems like discs get more and more annoying over time. Now it's not just the FBI warning, but also a studio logo, a distributor logo, a warning that "if you listen to the commentary, the views expressed may not represent the official views of the movie studio", and then finally an annoying long intro sequence (that may contain spoilers) before the menu finally appears to allow you to actually play the movie. The trailers are usually skippable but all the rest are not! You have to put up with this stuff anytime you want to watch the movie! Again, I'm pretty sure that the pirates don't do all this stuff, making the pirated product better.
Once anybody, anywhere in the world, has released an illegal copy of your content, it's all over. No amount of DRM that punishes the honest customers can get that content back once it's on the Internet. Why do they even try?
Those of us on Slashdot are unlikely to learn much of importance from the article, but if you skim it you might pick up a thing or two. I had never heard of Glom before, for example.
I did find it amusing that he showed a list of all his icons, including a Kubuntu icon, and then none of the KDE apps had the Kubuntu icon. I guess if you want to run KDE apps you should use Ubuntu instead of Kubuntu?:-/
I was also amused that he saw Lotus Symphony as a replacement for Microsoft Works. (IBM calls Symphony "Award-winning office productivity software".) Heh.
Where, exactly, is the boundary line between a file format and its documentation/specs?
If a file format is bad, no amount of documentation can make it good. To fix problems in the file format, you need to get everyone to upgrade their decoders (media players or whatever).
If a file format is good, but poorly documented, then improving the documentation can help people to use the file format correctly. There is no need for anyone to upgrade their decoders (and the people who have hardware-based decoders, like portable media players, are especially grateful); new content will just work better.
(Also, if a file format is good but the decoders were written badly, then if you document how to do the decoder right and get everyone to upgrade, then all the existing content starts working better.)
If you want the free-software alternative to Twitter, check out identi.ca. It is similar to Twitter, but explicitly designed to make sure you can control your own destiny. From their FAQ:
The goal here is autonomy -- you deserve the right to manage your own on-line presence. If you don't like how Identi.ca works, you can take your data and the source code and set up your own server (or move your account to another one).
Sadly, it continues the meme of inventing new jargon for "update". Just as a Twitter update is a "tweet", an ident.ca update is a "dent".:-/
When social networks first started to appear, I didn't see the appeal. But I'm starting to understand it now.
The things people do on social network sites have been around as long as the Internet; it's just that the modern way of doing them is a bit more convenient.
Suppose my wife and I go out and ride a bicycle event (such as the annual ride from Seattle to Portland) and have a great time. My wife will probably write up an email about it, and send it to a list of our friends and relatives. She has to maintain that list and keep it up to date, and people who aren't on it might never find out about it, even if they would love to read about what we are doing.
The alternative is that she could post it on Facebook or some other site. She could set the privacy settings so that only our friends can see it. Facebook automatically starts helping friends find each other, so over time more and more friends are automatically able to see the posting. And, like a blog, it's also an archive old old posts, so newly added friends can go back and read older items they missed (if they so choose).
Once I realized that Facebook is actually a better way to send out these sort of updates, I started to like it a bit more.
Like anything else, it can be overdone. You might think it is very entertaining to say "I'm eating a sandwich right now" but I doubt I'd agree.
And I don't recommend sharing lots of really personal information: an example today I heard is that some person might say "Man, I really hate my boss" and then his/her boss might find the page and read that comment! Likewise, if you like to go to parties where people drink giant vats full of beer, and/or smoke strange things, you probably don't want to post photos of yourself at those parties; and you don't want to post things like "man I'm so wasted ive got the munchies so bad 4:20 ha ha." Later, possibly even years later, you might be applying for a job someplace and the new company might decline you just because of those wild and crazy public updates.
Another thing to consider: there is a horrible amount of spam in normal email (about 95% of all email sent is spam!). Some people are increasingly relying on social networking sites to communicate: instead of group-emailing their friends, they just update their micro-blogs; instead of sending an email to a friend, they just use the chat feature. Personally, I am very offended that spammers are breaking email for the rest of us, and I don't want to see everyone retreat into walled gardens owned by corporate overlords; I'd like to see a proper fix for email. But nonetheless, there are some people who rarely or never bother to check their email, but check their social page many times a day.
I think in the near future, we will see a great convergence: you will use one client that will alert you to instant messages, emails, personal messages from social networking sites, updates to your friends' micro-blogs, and RSS/Atom feed updates. You will be able to reply via instant message, email, personal message, or updating your micro-blog, or updating your blog if you have one. People don't really care what the transport is underlying the messages; why do we need one client for instant messages, another one for email, another one for social network sites, and another one for RSS/Atom? (One of the selling points for Google Buzz is that it is knitted together with your Gmail.) I would love a super-aggregator, where I could get it to alert me if a message is really urgent or from someone really important, and where other messages would just queue up for my later perusal.
P.S. Two clients:
Ubuntu 10.04 includes a social networking client called Gwibber. It aggregates all social networks for you, and can color-code messages to help you keep track (like, blue messages were pulled from Facebook, but red messages came from Twitter, etc.). You can post an update, and it will automatically push it out to multiple services (Facebook, Twitter,
The patent issue here is not how to store a long filename in a FAT directory. The patent covers the technique for making a file system where each file has two names, and 8.3 "short" name and a "long" name.
This was crucial back in the day. Your Windows 3.1 system could read the floppy disk written by your Windows 95 computer; that file you saved as "ode to a summer day.txt" would wind up as ODETOA~1.TXT in Windows 3.1, and you could access the file.
But these days, nobody really cares about the 8.3 "short" filenames. Windows XP, Windows 7, Mac OS, etc. all just look at the long filenames.
So, Andrew Tridgell made a change to the Linux VFAT driver, and now Linux writes a valid long filename, and puts horrible junk in the space for the 8.3 filename. The horrible junk includes illegal characters for a filename. Thus, Linux is not writing both a long and a short filename, and thus isn't infringing.
And Linux still has the FAT driver, in addition to the VFAT driver. The FAT driver reads and writes 8.3 filenames only. In the event that you have a volume with nothing but 8.3 filenames, you can still use it with Linux.
The FAT long filenames patent should expire sometime around 2015, at which time Linux will return to full compatibility. (I presume that in countries that don't enforce software patents, people are still using Linux with full compatibility.)
The problem is simply that you know Python far better than you know Bourne...
I think it has something to do with liking Python far better than I like Bourne. Also, I'm a software developer and not a sysadmin, so I have more incentive to learn Python and less incentive to really master Bourne. YMMV.
"set -e" at the top of your script will instantly resolve all your concerns about unset variables and intermediate intermediate steps failing...
"set -e" is indeed a good trick to learn, and I thank you for it.
How about:
Ugh, sorry, no I don't like your case/esac solution. I'd rather use the wildcard globbing version someone else wrote in another comment:
case "$filename" in
*.temp|*.tmp|*.junk) rm -f "$filename";; esac
The reverse/cut/reverse trick is too baroque for my tastes.
I fail to see the horrible inconvenience in putting quotes around variables and file-names. Python syntax is VASTLY more cumbersome...
We are just going to have to agree to disagree on this one. IMHO, the bigger the program, the more Python wins. For the trivial 3-line script Python is longer and more annoying, I will concede, but for actual nontrivial scripts I have written, I'm glad I used Python.
As the saying goes, "That's why they make both chocolate and vanilla." You can have it your way and I'll have it my way.
Your shell-script-fu is indeed stronger than mine, and I salute you. However, instead of diligently studying until I reach your level of mastery, I think I will just continue to write nontrivial scripts in Python.
ls filename* | egrep "\.temp$|\.tmp$|\.junk$"... No?
Yes! However, if you are allowed to tweak my nose for not using xargs, I think I'm allowed to poke you for spawning an ls and an egrep just to identify a file. Oh, that poor overworked CPU.
And what's with all the regex stuff with find rather than just globbing?
Temporary insanity. I don't actually use find(1) every day, and for some reason I just forgot that -name could use ordinary globbing (as long as you remember to diligently quote it so the expansion doesn't happen when you invoke find!). Still, I kind of like the vertical-bar-alternatives thing... I've never really liked the "-o" stuff, and I'm downright annoyed by \( \) expression grouping.
Sorry. Maybe I'm just getting old. It's the fingers getting a bit stiff. I'm sure I could write lots and lots of code to grep for a filename but I'm just not up to it this evening.
Well, I deeply apologize for having inferior and weak shell-script-fu. I also apologize for using the term "shell-script-fu". And I apologize for apologizing so much... sorry.
having to specify the arguments separately in a list, means that there is no shell in the middle. Whereas os.system launches a shell that parses the command line, and in turn runs the process. I've had one case where the latency was noticeable, and there is the potential memory penalty as well.
Well, it's easy enough to write a convenient wrapper around subprocess.check_run() like so: import subprocess as sp
Then you are back to having a problem if arguments have spaces, of course!
I agree with not worrying too much about the overhead of the shell. There was a time once when the time to start up a shell was a major hit; on modern computers, not so much. But still, it's always nice to be efficient if it's easy, and simply using subprocess.check_call() instead of os.system() is pretty easy.
I suggest you first pick a popular Linux with good hardware support, such as my personal favorite Ubuntu. Then, offer both bootable CDs and USB flash drives, and VM images for VirtualBox. Since VirtualBox is free and multiplatform, as well as being easy to install, the students with weird hardware can use that to run Linux.
In my experience, Ubuntu just boots up and works on a wide variety of hardware. So I'd guess that many or most of your students would be able to boot their computer into native Linux. But some may want the VirtualBox for the convenience, especially if they have modern and very fast computers. The students with old computers might be happier just booting Linux directly and avoiding the overhead of virtualization.
It doesn't sound like your students will need exotic hardware to work; I mean, the free software video drivers might only support 2D for some modern graphics cards, but 2D would be enough to get Linux certified, right?
P.S. A friend of mine took a class where everyone was required to use Microsoft Virtual PC. However, it refused to run on his home computer and he had to do his homework on a different computer (at his place of work). Ubuntu Linux ran fine on the same computer where Virtual PC wouldn't work. So, when I first read the article summary I went "Huh, virtual machines to make it more likely to work?"
First, thank you for teaching me something new. I didn't know about $@ and that is a good one to know. (Is that POSIX standard, or a GNU extension?)
Second, wow, that is truly baroque. That is getting up into makefile levels of weird syntax. I still prefer the refreshingly clear syntax of Python for nontrivial scripting.
Third, when you want individual arguments, you still need to carefully quote them by hand. And this is a good example of the general rule, that you need to be very careful with quoting in shell scripts.
Fourth, yes, I agree with you: use the safer form all the time, even when you don't need to. It's like when I wrote my Python example of running an external program; I used subprocess.check_run() instead of os.system(). I like the convenience of os.system() but I generally want my scripts to stop on an error, and os.system() doesn't raise an exception on error.
I don't think I said it was nontrivial; I just said that Python was more convenient. If you wanted to test a single file and see whether it ended with one of three extensions in a shell script, what would you do?
You could do it this way, but it's painful and ugly: # shell variable "filename" holds the filename if [ "${filename#*.}" = "temp" ] || [ "${filename#*.}" = "tmp" ] || [ "${filename#*.}" = "junk" ]; then
echo "$filename" fi
Don't forget to put spaces around the square brackets, or you get errors.
Really, how would you solve this problem in shell? If you have a slick solution I'd love to learn it.
Your problem is: thinking ten lines of "if" statements to look at a filename.
Wow! It was so very kind of you to figure out my problem and inform me. Thanks!
Please read about the "find" command. especially with --exec rm '{}' \;
Oh, everyone's favorite user-friendly command, find(1). What an amazingly baroque set of command-line arguments it takes!
I trust you realize that using find(1) to delete a single file is about like using a chainsaw to cut butter to put on a piece of toast.
But if you want to remove all files that end with *.temp, *.tmp, or *.junk from a whole set of directories, it's this simple and friendly command: find/path/to/top/directory \( -regex ".*\.temp" -o -regex ".*\.tmp" -o -regex ".*\.junk" \) -exec rm {} \;
Don't forget that you have to put a backslash before the parentheses or the shell complains. Don't forget to put a space between your escaped parentheses and the find(1) predicates. Don't forget to use those parentheses or else the -exec command will bind with the last predicate (in this example, it would only delete the *.junk files).
Or, if you know your target platform is using GNU find(1), you can shorten it a lot: find/path/to/top/directory -regextype awk -regex ".*\.(temp|tmp|junk)" -exec rm {} \;
That assumes that you already knew that in AWK it is legal to put regular expression alternatives in parentheses, separated by vertical bars. Of course, you can also do this trick without specifying AWK mode but you need to backslash escape the parens and the vertical bars in the regexp that specifies the alternatives: find/path/to/top/directory -regex ".*\.\(temp\|tmp\|junk\)" -exec rm {} \;
You can do crazy powerful things with find(1) but it's syntax is annoying. I'd rather write a simple Python script using os.walk, such as: import os import sys
junk_extensions = (".temp", ".tmp", ".junk")
for dirpath, dirnames, filenames in os.walk(sys.argv[1]):
for basename in filenames:
fname = os.path.join(dirpath, basename)
if fname.endswith(junk_extensions):
os.remove(fname)
And really, if I'm doing this a lot, I'll write a simple Python function that hides some of the ugly details. And again, the Python solution is more bulletproof; it doesn't matter if any filenames have spaces in them, you get a sensible error message if you forget to specify an argument, etc. find(1) scares me; its syntax is tricky, and you are doing things over whole directory trees. If I'm going to automatically delete a bunch of files, I kind of want them to be the correct ones, and the Python is much easier to get correct.
Okay, I wrote lots of code. Your turn. Please show us all your most elegant solution, in shell script, to the problem of identifying whether a file has any extension from (".temp", ".tmp", ".junk).
I will quickly write a shell script any time I have some simple task I want to automate. You cannot beat the convenience: cd/some/directory/$1 some_program --foo $2 --bar $3 rm -f *.temp
Wow, three lines, and it runs the program, then cleans up the temp files that program always litters in my directory. And I don't have to memorize the --foo and --bar options! Shell scripts rock!
The problem comes when you start to do nontrivial things. When you start processing lists of files, and the files can contain spaces, the amount of quoting drives me insane. At that point I rewrite in Python.
The spaces-in-file-names problem can bite even this trivial shell script! If any of the three arguments ($1, $2, $3) is specified as a string containing spaces, this script won't work, because the shell interpreter needs quotes at every step where it evaluates something. If you pass "my file.txt" as the second argument, the $2 won't evaluate to "my file.txt" in quotes, it just evaluates to the bare string. So to be fully safe, the above program needs to be: cd/some/directory/"$1" some_program --foo "$2" --bar "$3" rm -f *.temp
And woe is you if you forget the quotes.
Python loses in convenience for running a program... here's a Python equivalent of the above: import os import subprocess as sp import sys
lst_args = ["rm", "-f", "*.temp"] sp.check_call(lst_args, shell=True) # run in a shell to get wildcard expansion
At first glance this looks horrible. It's much more than the three terse lines of the original. But it's easier to get right, and this is safer to run. If the user specifies something silly for the first arg, or doesn't provide it, this program will immediately stop after trying to change directories. The original would change to "/some/directory" and blindly run on, trying to run "some_program" there, and who knows what would happen? Likewise, if "some_program" fails, this script will stop immediately, and the deleting of the *.temp files will not occur (making it easier to debug what's going on). Finally, in this code we don't have to worry about quoting the arguments; we can just use the arguments and it just works. It is much harder to write a fail-safe shell script: you would have to explicitly test that $1 is provided, and you would have to check the result of running "some_program" to see if it failed or not.
The nontrivial scripts I write tend to have a lot of logic in the scripts themselves, and Python is much much more pleasant and effective for evaluating the logic. If I want to write a script that sweeps through a bunch of directories and deletes files that match certain criteria, it is so much easier to write the tests on the file in Python. If I write ten lines of "if" statements to look at a filename, that is ten lines where I didn't need to fuss with the double quotes. In Python, you can do things like junk_extension = (".temp", ".tmp", ".junk") if filename.endswith(junk_extension):
os.remove(filename)
Shell scripting cannot match this convenience. And note that if I use the native Python os.remove() I don't need to worry about quoting the filename; it can have spaces in it and os.remove() doesn't care.
Other people might prefer to use Perl or Ruby. Either of those, or Python, are much better than shell scripts for anything nontrivial.
The community still can't use it without a thorough patent examination, a universal royalty-free patent license, and an indemnity guarantee.
I suspect this is why Google has been so slow to announce their intentions: they have probably had lawyers combing through the IP, making sure that they didn't overlook anything.
I don't know if they can do an indemnity guarantee. You don't even get an indemnity guarantee when you license H.264!
But Google has deep pockets and would be the first target of any lawsuits over this. If they think VP8 is safe to release, they are probably right.
The amount of money that Google paid for On2 was pocket change by Google standards. And the amount of money that On2 made every year was in the noise level by Google standards. So it never seemed likely to me that Google bought On2 with the intention of selling codecs for money.
If VP8 really is as good as On2 claimed, Google could save some pretty good money by serving up YouTube videos in VP8 format instead of H264. And even better, Google would not have to worry about the H.264 patent owners changing the rates or changing the rules. So it really would be in Google's best interest if all of the YouTube users were able to view content in VP8. But given the head start of H.264 in the market, the only possible way for Google to get everyone to use VP8 would be to release it for free.
I'm happy about this. This is just a win/win for everyone. If VP8 is decently competitive with H.264, and it is completely free, then as shutdown -p now commented, there is no longer any need to choose between good compression and free software. Everyone can have both!
I bought *my* mac because it came with gcc, perl, apache, CUPS, and X-windows pre-installed on an open source Unix kernel. As a result, I could install just about anything on it.
Fair enough. But you cannot deny the truth that Apple's newest platforms are very much locked down. iPod Touch and iPhone and iPad, all of them you cannot install any software you want; you can only install software officially blessed by Apple. And Apple can and will deny software for capricious and unfair reasons, in addition to denying software for good reasons.
For those of you who haven't beaten yourself with a cluestick recently, the closed platform is not Apple; it is iTunes.
I really couldn't care much less about the iTunes Music Service. With the iPod, you can still install your own music files. Music is less locked down than apps.
I considered buying an iPod Touch to replace my old Palm PDA. One thing I do care about: I want a Palm emulator to run a few legacy Palm apps I care about. Apple's policy is no emulators, ever, on their closed platforms, which includes the iPod Touch. So I won't buy one. I shouldn't have to "jailbreak" my own hardware just to install software of my own choosing.
P.S. So tell me, do I need to be beaten with a cluestick? If so, where am I clueless?
I don't care whether Google prepares an iPad rival. A whole bunch of new Linux tablets are coming, likewise a whole bunch of "smartbooks" (netbook computers with non-x86 processors).
I'm really excited about the nVidia Tegra 2 chip. Typical power dissipation of about 500 milliWatts, 8 cores: ARM7 "housekeeping" core, dual 1GHz ARM9 processing cores, audio core, graphics accelerator core, video encode core, video decode core, and "image processing" core (which will support a high-resolution camera). nVidia showed off prototype smartbooks with a Tegra 2 playing HD video, and claimed that the chip was dissipating 150 milliWatts; elsewhere I have seen 500 milliWatts as the typical number.
I'm also excited about the Pixel Qi screen. That's the same display technology from the OLPC. A nice-looking display that dissipates 2 Watts when the backlight is on, and about 0.2 Watts with the backlight disabled. If you want to sit outside in the bright sun, you turn the backlight off and you get a nice, readable, sharp display that's very suitable for ebooks and web surfing, but you could watch movies that way too if you wanted.
A typical Atom system dissipates 15 to 20 Watts while operating. That's why netbooks need cooling fans. A Tegra 2/Pixel Qi system ought to have tremendous battery life, especially with the backlight off, and won't need a cooling fan. Win/win.
So, what I want is a tablet and a smartbook with a Tegra 2 and a Pixel Qi screen. I want Linux, but that's no problem, because Windows doesn't even run on a Tegra 2, and I don't think anybody is going to ship a Windows CE tablet. And I insist on a device with USB ports: I want to be able to plug in a keyboard, a mouse, a memory card reader, or USB storage devices.
I imagine that Acer and Asus will both ship products I will want. But the actual announced product I know about is the Notion Ink Adam tablet: Tegra 2 chip, Pixel Qi screen, capacitive multitouch touchscreen, Android OS. It also has an intriguing feature: a trackpad on the back of the device, which allows you to use Flash applications that were designed for use with a mouse (you use a finger on the back to drag the cursor around, and tap on the front with your other hand to click the mouse). It also has a camera that can be flipped around to point at you, away from you, or in between. It was originally announced for June, but recent news casts doubt on that.
By the way, one reason why tablets are the hot new form factor: people who see something that looks like a notebook computer expect it to run Windows, but people who see a tablet device have no expectations. So, there will probably be more tablets than smartbooks.
I still have a hard time truly imagining what the point of an FPSRTS would be.
Well, I won't try to answer that question in the abstract. I'll just describe how it works in Battlezone.
You are a guy who is there on the planet with your other units. You can give them orders, via radio I guess, or you can do things yourself. Your units have pretty lame AI, but three things they are pretty good at: "follow me", "attack that enemy", "defend the base".
You have some kind of mission on each level. Some of the missions absolutely require you to get out there and do something; other missions could possibly be completed just by you giving orders to other units.
My general approach was to have my units set up a "base" somewhere so they would be safe without me, then leave them. In Battlezone, you have some manufacturing units that need to deploy on a "steam vent" or need to have a solar collector nearby; so, I would find a suitable spot to set up the "base". Once the manufacturing units were set up, I would order at least four or five gun turret units, and I would set them up so that at least two could fire on any unit approaching the base from any direction. I would also order a handful of tanks and give them orders to "defend the base". Then I would order some upgrades built for my tank, to make it into a super-tank, and I would pretty much then just go and solve the problem. From time to time I would get "radio" reports: Base under attack! All attackers destroyed!
Like most RTS games, there was a resource management element. You needed to get "scrap" which could be manufactured into units. Tanks and such needed little guys to drive them, and you had a limited supply of the guys, although if a tank got blown up your guy would eject and start walking back to base; when he got there you could order up a new tank for him. (It was kind of abstract... you could manufacture some more little guys just by building a "barracks", which makes no sense at all.) Anyway you would find a good "scrap field" and order your scrap-collecting units to start picking up scrap. But you also usually needed to order a tank or two to "defend the scrap collectors". The collectors were slow, and clumsy, and dumb... easy pickings for even a scout tank. But on all the levels, you just started with a handful of scrap; you really needed to find a scrap field and get a lot more scrap to be able to build enough units to handle the level.
One of my favorite levels featured an enemy convoy that was going to go through a valley. You would have to take your tank, and use the jump jets to get it up on top of some rocks, and there take out the enemy artillery. Once the enemy artillery was dead, it was safe for you to order your manufacturing guys to run to the end of the valley, set up, build scrap collectors, and start cranking out offensive units. For this level, I liked to build five giant walking mechas (with machine-gun hands) and a bunch of artillery. I would upgrade my tank to have a "spinner" gun, basically my own artillery weapon. Then a whole enemy convoy would run down the valley and get cut to bits by my forces. You had this clock counting down, and you needed to have everything set up before the clock ran out and the enemy convoy arrived.
Another of my favorite levels ended with needing to destroy a complete enemy base. I would set up my defensive base, and then order up three artillery units, and order them to follow me. Then I would go and set them up out of line of sight from the enemy base, and myself pop up and "spot" for the artillery. I would have all three artillery pick one unit on the base and all hammer it until it was destroyed, repeat until out of units. Manufacturing units that are deployed (on a steam vent or whatever) can use scrap to repair themselves; but three artillery units can pound them faster than they can repair.
Another memorable level: you had to get out of your tank and run around, and crouch and hide near where an enemy patrol was expected. T
Figure out what it is that you really like about the game. Then make a game that does something similar, and conveys the essence of what you like.
For example, the essence of "Asteroids" would be a game where you pilot a space ship in 2D, with a simplified physics model (if you stop firing the engines, your ship will actually slow down and eventually stop due to some sort of highly unrealistic "friction" in space) and you busily dodge and shoot things. You could make a game that isn't called "Asteroids", doesn't have vector graphics, and has somewhat different rules, but it would still capture the essence. It doesn't matter if your rocks are kind of ugly or your sound effects are lame, but it does matter if the controls for the ship are sluggish to respond, or the game animation is jerky, that sort of thing. Sound effects and rock graphics are easily upgraded later; focus on the soul of your game. (I used to play Asteroids, and it wasn't because the graphics were so good or the music was so great. In fact, there was no music, although that sort of "heartbeat" sound effect was kind of cool for the day...)
Once you have your core gameplay, you may start having original ideas that may take you in a new direction. Suppose you added gravity to your spaceship game, and the player has to fly in and out of cave networks, shooting little bases and collecting stuff? (That one is called "Gravitar".) Suppose you shoot rocks, but they don't blow up, and little crystals come out and you collect them? Then add a giant lion-faced robot boss... (That one is called "Sinistar".) So, don't call your project some lame name like "Asteroids Clone"; it may not end up being a clone. You could call it some goofy name like "Nexuiz" and thanks to the miracle of the Internet, people would still find out about it (if it's worth finding out about).
Also, here is a meta hint that applies to any free software project: focus on what you are good at, and make something that is usable even if limited. If you make a game that is quite playable, but just has one level that repeats over and over, you may attract a fan base and someone may volunteer to write a new level for it. If your music is weak, someone who is a musician may donate some better music. But nobody will volunteer to take a broken mass of code that doesn't even compile, and help you sort it out. Successful free software projects build a community and some momentum, but you won't get a community or momentum without making something that actually works.
I suggest an informal "agile" approach. Get something working, no matter how limited and lame. For example, a ship that flies around. Then add some feature, and get that working too. Say, rocks. Then keep adding things: collision detection (ship must dodge), ship gun, rocks splitting when hit, a score counter, etc. At each step, get something that works and check it in to a source control system before you go on.
I use an informal agile approach on just about everything I do. If you are making a truly complicated game that needs crazy amounts of design, even then I suggest doing the agile thing... just design the broad outlines, then pick some easy corner of the project and start there.
Especially in a project you are doing in your spare time for fun, this style of developing is a good idea. And in true open source style, consider making all your little incremental releases publicly available. If you are lucky, you may start to build a little community even while you are still at the pre-alpha stage.
P.S. If you are looking for a project, please consider the Activision "Battlezone" game. It was an odd hybrid of a real-time strategy game and a first person shooter, and I enjoyed it thoroughly. If I ever tackle a game project like you are proposing, it would be this.
And Microsoft promised to support OS/2 after it sold 2 million copies.
Never happened.
Could you provide us with some sort of reference to support this?
The way I remember it, Microsoft supported OS/2 from the beginning; see here for screen shots of Microsoft Word and Microsoft Excel for OS/2.
At the time, Microsoft had an OS/2 group, and a Windows group, and both groups were trying to get people to write apps for their respective systems. Microsoft was telling people that if their computers had 2MB of RAM or less, they should run Windows, but if they had more than that, they should run OS/2, because it was the future.
Then, in 1990, Windows 3.0 shipped, and it was a runaway smash success; at that time Microsoft decided to throw their weight behind Windows. They cut their famous deal with IBM, where IBM would keep the OS/2 business and support the OS/2 customers, and Microsoft would go its own way with Windows. From that point on, I am not aware of any promises from Microsoft with respect to OS/2: Microsoft was pushing Windows with both hands.
So, if you know something I don't, please provide a link so I can read up on it. Thanks.
Nice theory, but in practice it doesn't work. You still get bothered again next time.
You sound like an advanced hacker type. Google search for "Linux USB hotplug scripts" and read up. You can control what happens when you plug a device in, and you can choke off the behavior you don't like before GNOME is ever notified that something was plugged in. (I haven't bothered to research this in detail because, as I said, I'm okay with the default behavior.)
What does bonobo even *do*, besides complicate the dependency tree?
Bonobo was a way for GNOME applications to expose functionality and data to each other. It is very similar to Microsoft's OLE, or KDE's KParts. The replacement for Bonobo is that the whole world is using DBUS now. (DBUS isn't just for the kernel to publish notifications to user space; user space processes can also use it to talk to each other.)
the ability to use the file manager as a web browser (WHY would I EVER want that?)
Wait, does GNOME even have that? I just tried it in Ubuntu 10.04 Beta 1, and it doesn't work.
On the other hand, KDE has had that for years; Konqueror. (Google it; the top hit says "Konqueror - Konqueror - Web Browser, File Manager - and more!")
I agree with you that I am fine with the file manager and the web browser being two different tools. I guess I don't care if they are merged, but I don't view it as a feature.
As for most of the rest of your complaints, I can't feel much sympathy. When I plug in a USB hard drive, I like that a notification pops up. There is plumbing for you to control what happens; right there in the popup dialog you can choose what you want it to do, and then choose "always do this". At a deeper level, there are config files that let you absolutely control what happens when you plug things in. As for GConf, I like it: it takes every good thing about the Windows Registry and ditches the bad stuff. (Good: a daemon manages the settings and avoids race conditions when multiple processes want to update the settings; also good, the settings are stored in XML text files. Bad stuff in Windows: an opaque binary database format that is prone to corruption... yuck.)
I can't say I'm very excited at the prospect of Gnome 3.0.
Nor am I. As far as I am concerned, Gnome 3.0 should look pretty much exactly like Gnome 2.30. They will be removing all deprecated technologies; things like Bonobo will be completely gone. That's worth bumping the major version number. But I don't want an exciting new paradigm. (I am not happy about the direction Ubuntu is taking, either.)
Unless there is some ultra-low-heat version of the Atom chipset, an Atom tablet will need a cooling fan, and cooling vents. Part of the tablet will get warm and warm air will vent out one side. And this means that battery life is being wasted, converted to useless heat. Bigger, heavier, clunkier, and less battery life. Lose/lose/lose/lose. And your major advantage of the Atom is that it runs off-the-shelf Windows (or Linux) but off-the-shelf doesn't take good advantage of a touchpad; you are better off with something like Android.
I don't know if HP will put Palm's WebOS on their first tablet, or take the conservative choice and just do another Android tablet. I'm no marketing guy, but I just don't see much cachet in the WebOS; if you want to advertise lots of apps and a nice app store, Android would be the way to go. It's good for everyone (except Apple and Microsoft) if Android becomes a very standard platform with lots of units in the field to build a market segment that wants Android apps. (Right now if you are an apps developer, it's pretty much a given that you need to support iPhone... and maybe you don't even bother to support anything else! I'm hoping that the Android will become at least an equal target for apps, if not bigger than iPhone.)
On the other hand, would HP pay 1.2 billion dollars just to get Palm's expertise and staff? HP must have some sort of plans for WebOS. Which argues that they are likely to go with WebOS on their new tablets. But I don't see how they can turn that into a sales advantage. ("We have an OS nobody else has... it's exclusive!" sounds better than "You can't use the Android app store apps on this platform" but they mean the same thing.)
steveha
Intel doesn't really want the Atom to improve. They don't want to give up any of the Atom sales to AMD, but what they really want is for everyone to buy more-expensive and more-upscale Intel CPUs such as Core Duo or i5.
Their problem is the Tegra 2. This is an 8-core chip that draws tiny amounts of power and yet is overall more powerful than the Atom. For half a Watt or less, you get an ARM 7 core (probably for "housekeeping"), two ARM 9 cores clocked at 1 GHz (with out-of-order execution and dual issue) for data processing, audio and graphics accelerator cores, video encode and decode cores, and an image processing core that can support a camera. This thing can decode HD movies in real time without even using the ARM 9 cores for anything!
The Apple iPad uses the Apple A4 chip, which is believed to be basically an ARM 8 core at 1 GHz. ARM 8 means no out-of-order or dual issue. So the iPad has a single 1 GHz core and a graphics accelerator, and it can already give a pretty good user experience; just think what people can do if they get multiple cores all working at once with the Tegra 2.
The Tegra 2 plus Android (and plus a Pixel Qi screen) is the combination to watch. Microsoft can't be happy; they want everyone to license the mobile Windows stack, but Android is both compelling and free, so that will be hard to compete with.
Intel can't be happy, because they have no way to keep the Tegra 2 from eating into the Atom market share. "Smartbook" computers and tablets will be better with a Tegra 2 because they will dissipate less heat (no need for a cooling fan) and use less battery life while getting more work done than is possible with an Atom. It's win/win/win, but you can't get it with Windows 7, you need mobile Windows or Linux, and it's going to be Linux (Android).
If Intel made a dual-core Atom on the 32 nanometer process, with an appropriately low-power chipset, not only would it go into netbooks but companies would start making desktop computers out of it. Why not? Get an "Energy Star" logo in the USA and sell them as "green" corporate computers or thin clients. Performance wouldn't be quite as good as a Core 2 Duo, but more than good enough, and Intel would be making less money because the margins are thinner on the Atom. Intel won't want that... (Remember Intel putting limits on how good a netbook can be? Screen can't be too big or touchscreen, can't have too much RAM, etc. Intel is trying to protect the market position of their mobile processors above the Atom.)
steveha
This guy sounds like a desperate market speculator that has no clue how the market works... etc etc etc
Whereas you sound like you didn't even read TFA. Or if you did, you don't understand it. Let me break it down for you.
TFA says that there will be relentless downward pressure on computer prices from now on. This point is unassailable.
I can buy a Compaq laptop with a dual-core AMD chip, a great 15.6" display, big hard disk, a DVD drive, and lots of RAM, all for about $400, quantity 1 retail. (Or $370 on sale at Fry's.) I can put Ubuntu on it, and the result is nearly as nice as an Apple laptop. Checking apple.com, I see that I can buy a 13" MacBook for $1000, or a 15" MacBook Pro for $1800. No question, the Apple notebooks are nicer: they have that nifty magnetic power cord, they have slot-loading optical drives, they have the great unibody aluminum chassis, etc. But I have to tell you, if I'm spending my own money, it's going to be that $400 computer, or even a $250 netbook with a 10.1" screen. Does a 13" MacBook really offer me four times the value of a $250 netbook?
TFA says that in the future, Apple is worried that it will be forced to cut their prices and sell at low margins, because the entire PC industry will be forced to cut prices and sell at low margins. I don't see much to debate here either. Here is a quote from TFA:
Is that clear enough for you? PCs aren't going away, but the traditional PC profit margins are going away, and this will cause a shakeup in the PC manufacturing industry. Apple has, so far, managed to make higher margins than the typical 10%, but how long can they continue this?
And what do you know, Apple has successfully set up a whole ecosystem where consumers must go through the Apple App Store to get applications, and Apple collects a 30% cut. TFA says that Apple would do almost anything, maybe even give the hardware away, to get all their customers locked into such an ecosystem.
In short, TFA doesn't say that PCs are going away. It says that PCs are going to be cheap, fast, and ubiquitous, and that companies selling PCs will be forced to accept slim margins. And Apple really doesn't want to play that game. Remember how Steve Jobs dissed netbooks? Apple doesn't want to sell a netbook, or even an iPad, for $250; and the market won't let them get away with selling a netbook for $500. The actual problem Steve Jobs has with netbooks is the razor-thin margins. So far, the market will allow Apple to charge $500 and up for an iPad (although I don't think that can last forever either; great iPad competitors ).
TFA isn't the only place I have seen this theory. See also: http://industry.bnet.com/technology/10006035/why-apple-will-eventually-dump-the-mac/
Maybe the article is far-fetched. But if Steve Jobs thinks he has any chance at all of locking all of Apple's customers into an App Store ecosystem where Apple skims 30% of all the action, you better believe he will go for it.
steveha
When will the studios ever figure out that the DRM isn't stopping piracy at all, and only hurts the honest customers?
It's a bitter irony that the pirates offer a better product: it will play in any player (no DRM), it probably doesn't force you to watch an "FBI warning", it probably doesn't have a commercial about how evil it is to pirate things, and it probably doesn't have endless trailers for other discs.
And it seems like discs get more and more annoying over time. Now it's not just the FBI warning, but also a studio logo, a distributor logo, a warning that "if you listen to the commentary, the views expressed may not represent the official views of the movie studio", and then finally an annoying long intro sequence (that may contain spoilers) before the menu finally appears to allow you to actually play the movie. The trailers are usually skippable but all the rest are not! You have to put up with this stuff anytime you want to watch the movie! Again, I'm pretty sure that the pirates don't do all this stuff, making the pirated product better.
Once anybody, anywhere in the world, has released an illegal copy of your content, it's all over. No amount of DRM that punishes the honest customers can get that content back once it's on the Internet. Why do they even try?
steveha
Those of us on Slashdot are unlikely to learn much of importance from the article, but if you skim it you might pick up a thing or two. I had never heard of Glom before, for example.
I did find it amusing that he showed a list of all his icons, including a Kubuntu icon, and then none of the KDE apps had the Kubuntu icon. I guess if you want to run KDE apps you should use Ubuntu instead of Kubuntu? :-/
I was also amused that he saw Lotus Symphony as a replacement for Microsoft Works. (IBM calls Symphony "Award-winning office productivity software".) Heh.
steveha
Where, exactly, is the boundary line between a file format and its documentation/specs?
If a file format is bad, no amount of documentation can make it good. To fix problems in the file format, you need to get everyone to upgrade their decoders (media players or whatever).
If a file format is good, but poorly documented, then improving the documentation can help people to use the file format correctly. There is no need for anyone to upgrade their decoders (and the people who have hardware-based decoders, like portable media players, are especially grateful); new content will just work better.
(Also, if a file format is good but the decoders were written badly, then if you document how to do the decoder right and get everyone to upgrade, then all the existing content starts working better.)
steveha
If you want the free-software alternative to Twitter, check out identi.ca. It is similar to Twitter, but explicitly designed to make sure you can control your own destiny. From their FAQ:
Sadly, it continues the meme of inventing new jargon for "update". Just as a Twitter update is a "tweet", an ident.ca update is a "dent". :-/
steveha
When social networks first started to appear, I didn't see the appeal. But I'm starting to understand it now.
The things people do on social network sites have been around as long as the Internet; it's just that the modern way of doing them is a bit more convenient.
Suppose my wife and I go out and ride a bicycle event (such as the annual ride from Seattle to Portland) and have a great time. My wife will probably write up an email about it, and send it to a list of our friends and relatives. She has to maintain that list and keep it up to date, and people who aren't on it might never find out about it, even if they would love to read about what we are doing.
The alternative is that she could post it on Facebook or some other site. She could set the privacy settings so that only our friends can see it. Facebook automatically starts helping friends find each other, so over time more and more friends are automatically able to see the posting. And, like a blog, it's also an archive old old posts, so newly added friends can go back and read older items they missed (if they so choose).
Once I realized that Facebook is actually a better way to send out these sort of updates, I started to like it a bit more.
Like anything else, it can be overdone. You might think it is very entertaining to say "I'm eating a sandwich right now" but I doubt I'd agree.
And I don't recommend sharing lots of really personal information: an example today I heard is that some person might say "Man, I really hate my boss" and then his/her boss might find the page and read that comment! Likewise, if you like to go to parties where people drink giant vats full of beer, and/or smoke strange things, you probably don't want to post photos of yourself at those parties; and you don't want to post things like "man I'm so wasted ive got the munchies so bad 4:20 ha ha." Later, possibly even years later, you might be applying for a job someplace and the new company might decline you just because of those wild and crazy public updates.
Another thing to consider: there is a horrible amount of spam in normal email (about 95% of all email sent is spam!). Some people are increasingly relying on social networking sites to communicate: instead of group-emailing their friends, they just update their micro-blogs; instead of sending an email to a friend, they just use the chat feature. Personally, I am very offended that spammers are breaking email for the rest of us, and I don't want to see everyone retreat into walled gardens owned by corporate overlords; I'd like to see a proper fix for email. But nonetheless, there are some people who rarely or never bother to check their email, but check their social page many times a day.
I think in the near future, we will see a great convergence: you will use one client that will alert you to instant messages, emails, personal messages from social networking sites, updates to your friends' micro-blogs, and RSS/Atom feed updates. You will be able to reply via instant message, email, personal message, or updating your micro-blog, or updating your blog if you have one. People don't really care what the transport is underlying the messages; why do we need one client for instant messages, another one for email, another one for social network sites, and another one for RSS/Atom? (One of the selling points for Google Buzz is that it is knitted together with your Gmail.) I would love a super-aggregator, where I could get it to alert me if a message is really urgent or from someone really important, and where other messages would just queue up for my later perusal.
P.S. Two clients:
Ubuntu 10.04 includes a social networking client called Gwibber. It aggregates all social networks for you, and can color-code messages to help you keep track (like, blue messages were pulled from Facebook, but red messages came from Twitter, etc.). You can post an update, and it will automatically push it out to multiple services (Facebook, Twitter,
The patent issue here is not how to store a long filename in a FAT directory. The patent covers the technique for making a file system where each file has two names, and 8.3 "short" name and a "long" name.
This was crucial back in the day. Your Windows 3.1 system could read the floppy disk written by your Windows 95 computer; that file you saved as "ode to a summer day.txt" would wind up as ODETOA~1.TXT in Windows 3.1, and you could access the file.
But these days, nobody really cares about the 8.3 "short" filenames. Windows XP, Windows 7, Mac OS, etc. all just look at the long filenames.
So, Andrew Tridgell made a change to the Linux VFAT driver, and now Linux writes a valid long filename, and puts horrible junk in the space for the 8.3 filename. The horrible junk includes illegal characters for a filename. Thus, Linux is not writing both a long and a short filename, and thus isn't infringing.
And Linux still has the FAT driver, in addition to the VFAT driver. The FAT driver reads and writes 8.3 filenames only. In the event that you have a volume with nothing but 8.3 filenames, you can still use it with Linux.
http://www.osnews.com/story/21766/Linux_Kernel_Patch_Works_Around_Microsoft_s_FAT_Patents
The FAT long filenames patent should expire sometime around 2015, at which time Linux will return to full compatibility. (I presume that in countries that don't enforce software patents, people are still using Linux with full compatibility.)
steveha
The problem is simply that you know Python far better than you know Bourne...
I think it has something to do with liking Python far better than I like Bourne. Also, I'm a software developer and not a sysadmin, so I have more incentive to learn Python and less incentive to really master Bourne. YMMV.
"set -e" at the top of your script will instantly resolve all your concerns about unset variables and intermediate intermediate steps failing...
"set -e" is indeed a good trick to learn, and I thank you for it.
How about:
Ugh, sorry, no I don't like your case/esac solution. I'd rather use the wildcard globbing version someone else wrote in another comment:
case "$filename" in
*.temp|*.tmp|*.junk) rm -f "$filename";;
esac
The reverse/cut/reverse trick is too baroque for my tastes.
I fail to see the horrible inconvenience in putting quotes around variables and file-names. Python syntax is VASTLY more cumbersome...
We are just going to have to agree to disagree on this one. IMHO, the bigger the program, the more Python wins. For the trivial 3-line script Python is longer and more annoying, I will concede, but for actual nontrivial scripts I have written, I'm glad I used Python.
As the saying goes, "That's why they make both chocolate and vanilla." You can have it your way and I'll have it my way.
Thanks for the conversation.
steveha
Your shell-script-fu is indeed stronger than mine, and I salute you. However, instead of diligently studying until I reach your level of mastery, I think I will just continue to write nontrivial scripts in Python.
ls filename* | egrep "\.temp$|\.tmp$|\.junk$" ... No?
Yes! However, if you are allowed to tweak my nose for not using xargs, I think I'm allowed to poke you for spawning an ls and an egrep just to identify a file. Oh, that poor overworked CPU.
And what's with all the regex stuff with find rather than just globbing?
Temporary insanity. I don't actually use find(1) every day, and for some reason I just forgot that -name could use ordinary globbing (as long as you remember to diligently quote it so the expansion doesn't happen when you invoke find!). Still, I kind of like the vertical-bar-alternatives thing... I've never really liked the "-o" stuff, and I'm downright annoyed by \( \) expression grouping.
Sorry. Maybe I'm just getting old. It's the fingers getting a bit stiff. I'm sure I could write lots and lots of code to grep for a filename but I'm just not up to it this evening.
Well, I deeply apologize for having inferior and weak shell-script-fu. I also apologize for using the term "shell-script-fu". And I apologize for apologizing so much... sorry.
steveha
having to specify the arguments separately in a list, means that there is no shell in the middle. Whereas os.system launches a shell that parses the command line, and in turn runs the process. I've had one case where the latency was noticeable, and there is the potential memory penalty as well.
Well, it's easy enough to write a convenient wrapper around subprocess.check_run() like so:
import subprocess as sp
def run(s_cmd):
lst_cmd = s_cmd.split()
sp.check_call(lst_cmd)
Then you are back to having a problem if arguments have spaces, of course!
I agree with not worrying too much about the overhead of the shell. There was a time once when the time to start up a shell was a major hit; on modern computers, not so much. But still, it's always nice to be efficient if it's easy, and simply using subprocess.check_call() instead of os.system() is pretty easy.
steveha
I suggest you first pick a popular Linux with good hardware support, such as my personal favorite Ubuntu. Then, offer both bootable CDs and USB flash drives, and VM images for VirtualBox. Since VirtualBox is free and multiplatform, as well as being easy to install, the students with weird hardware can use that to run Linux.
In my experience, Ubuntu just boots up and works on a wide variety of hardware. So I'd guess that many or most of your students would be able to boot their computer into native Linux. But some may want the VirtualBox for the convenience, especially if they have modern and very fast computers. The students with old computers might be happier just booting Linux directly and avoiding the overhead of virtualization.
It doesn't sound like your students will need exotic hardware to work; I mean, the free software video drivers might only support 2D for some modern graphics cards, but 2D would be enough to get Linux certified, right?
P.S. A friend of mine took a class where everyone was required to use Microsoft Virtual PC. However, it refused to run on his home computer and he had to do his homework on a different computer (at his place of work). Ubuntu Linux ran fine on the same computer where Virtual PC wouldn't work. So, when I first read the article summary I went "Huh, virtual machines to make it more likely to work?"
steveha
First, thank you for teaching me something new. I didn't know about $@ and that is a good one to know. (Is that POSIX standard, or a GNU extension?)
Second, wow, that is truly baroque. That is getting up into makefile levels of weird syntax. I still prefer the refreshingly clear syntax of Python for nontrivial scripting.
Third, when you want individual arguments, you still need to carefully quote them by hand. And this is a good example of the general rule, that you need to be very careful with quoting in shell scripts.
Fourth, yes, I agree with you: use the safer form all the time, even when you don't need to. It's like when I wrote my Python example of running an external program; I used subprocess.check_run() instead of os.system(). I like the convenience of os.system() but I generally want my scripts to stop on an error, and os.system() doesn't raise an exception on error.
steveha
I do not call following script to be nontrivial.
I don't think I said it was nontrivial; I just said that Python was more convenient. If you wanted to test a single file and see whether it ended with one of three extensions in a shell script, what would you do?
You could do it this way, but it's painful and ugly:
# shell variable "filename" holds the filename
if [ "${filename#*.}" = "temp" ] || [ "${filename#*.}" = "tmp" ] || [ "${filename#*.}" = "junk" ]; then
echo "$filename"
fi
Don't forget to put spaces around the square brackets, or you get errors.
Really, how would you solve this problem in shell? If you have a slick solution I'd love to learn it.
Your problem is: thinking ten lines of "if" statements to look at a filename.
Wow! It was so very kind of you to figure out my problem and inform me. Thanks!
Please read about the "find" command. especially with --exec rm '{}' \;
Oh, everyone's favorite user-friendly command, find(1). What an amazingly baroque set of command-line arguments it takes!
I trust you realize that using find(1) to delete a single file is about like using a chainsaw to cut butter to put on a piece of toast.
But if you want to remove all files that end with *.temp, *.tmp, or *.junk from a whole set of directories, it's this simple and friendly command:
/path/to/top/directory \( -regex ".*\.temp" -o -regex ".*\.tmp" -o -regex ".*\.junk" \) -exec rm {} \;
find
Don't forget that you have to put a backslash before the parentheses or the shell complains. Don't forget to put a space between your escaped parentheses and the find(1) predicates. Don't forget to use those parentheses or else the -exec command will bind with the last predicate (in this example, it would only delete the *.junk files).
Or, if you know your target platform is using GNU find(1), you can shorten it a lot:
/path/to/top/directory -regextype awk -regex ".*\.(temp|tmp|junk)" -exec rm {} \;
find
That assumes that you already knew that in AWK it is legal to put regular expression alternatives in parentheses, separated by vertical bars. Of course, you can also do this trick without specifying AWK mode but you need to backslash escape the parens and the vertical bars in the regexp that specifies the alternatives:
/path/to/top/directory -regex ".*\.\(temp\|tmp\|junk\)" -exec rm {} \;
find
You can do crazy powerful things with find(1) but it's syntax is annoying. I'd rather write a simple Python script using os.walk, such as:
import os
import sys
junk_extensions = (".temp", ".tmp", ".junk")
for dirpath, dirnames, filenames in os.walk(sys.argv[1]):
for basename in filenames:
fname = os.path.join(dirpath, basename)
if fname.endswith(junk_extensions):
os.remove(fname)
And really, if I'm doing this a lot, I'll write a simple Python function that hides some of the ugly details. And again, the Python solution is more bulletproof; it doesn't matter if any filenames have spaces in them, you get a sensible error message if you forget to specify an argument, etc. find(1) scares me; its syntax is tricky, and you are doing things over whole directory trees. If I'm going to automatically delete a bunch of files, I kind of want them to be the correct ones, and the Python is much easier to get correct.
Okay, I wrote lots of code. Your turn. Please show us all your most elegant solution, in shell script, to the problem of identifying whether a file has any extension from (".temp", ".tmp", ".junk).
steveha
I will quickly write a shell script any time I have some simple task I want to automate. You cannot beat the convenience:
/some/directory/$1
cd
some_program --foo $2 --bar $3
rm -f *.temp
Wow, three lines, and it runs the program, then cleans up the temp files that program always litters in my directory. And I don't have to memorize the --foo and --bar options! Shell scripts rock!
The problem comes when you start to do nontrivial things. When you start processing lists of files, and the files can contain spaces, the amount of quoting drives me insane. At that point I rewrite in Python.
The spaces-in-file-names problem can bite even this trivial shell script! If any of the three arguments ($1, $2, $3) is specified as a string containing spaces, this script won't work, because the shell interpreter needs quotes at every step where it evaluates something. If you pass "my file.txt" as the second argument, the $2 won't evaluate to "my file.txt" in quotes, it just evaluates to the bare string. So to be fully safe, the above program needs to be:
/some/directory/"$1"
cd
some_program --foo "$2" --bar "$3"
rm -f *.temp
And woe is you if you forget the quotes.
Python loses in convenience for running a program... here's a Python equivalent of the above:
import os
import subprocess as sp
import sys
os.chdir("/some/directory/%s" % sys.argv[1])
lst_args = ["some_program", "--foo", sys.argv[2], "--bar", sys.argv[3]]
sp.check_call(lst_args)
lst_args = ["rm", "-f", "*.temp"]
sp.check_call(lst_args, shell=True) # run in a shell to get wildcard expansion
At first glance this looks horrible. It's much more than the three terse lines of the original. But it's easier to get right, and this is safer to run. If the user specifies something silly for the first arg, or doesn't provide it, this program will immediately stop after trying to change directories. The original would change to "/some/directory" and blindly run on, trying to run "some_program" there, and who knows what would happen? Likewise, if "some_program" fails, this script will stop immediately, and the deleting of the *.temp files will not occur (making it easier to debug what's going on). Finally, in this code we don't have to worry about quoting the arguments; we can just use the arguments and it just works. It is much harder to write a fail-safe shell script: you would have to explicitly test that $1 is provided, and you would have to check the result of running "some_program" to see if it failed or not.
The nontrivial scripts I write tend to have a lot of logic in the scripts themselves, and Python is much much more pleasant and effective for evaluating the logic. If I want to write a script that sweeps through a bunch of directories and deletes files that match certain criteria, it is so much easier to write the tests on the file in Python. If I write ten lines of "if" statements to look at a filename, that is ten lines where I didn't need to fuss with the double quotes. In Python, you can do things like
junk_extension = (".temp", ".tmp", ".junk")
if filename.endswith(junk_extension):
os.remove(filename)
Shell scripting cannot match this convenience. And note that if I use the native Python os.remove() I don't need to worry about quoting the filename; it can have spaces in it and os.remove() doesn't care.
Other people might prefer to use Perl or Ruby. Either of those, or Python, are much better than shell scripts for anything nontrivial.
steveha
The community still can't use it without a thorough patent examination, a universal royalty-free patent license, and an indemnity guarantee.
I suspect this is why Google has been so slow to announce their intentions: they have probably had lawyers combing through the IP, making sure that they didn't overlook anything.
I don't know if they can do an indemnity guarantee. You don't even get an indemnity guarantee when you license H.264!
But Google has deep pockets and would be the first target of any lawsuits over this. If they think VP8 is safe to release, they are probably right.
steveha
The amount of money that Google paid for On2 was pocket change by Google standards. And the amount of money that On2 made every year was in the noise level by Google standards. So it never seemed likely to me that Google bought On2 with the intention of selling codecs for money.
If VP8 really is as good as On2 claimed, Google could save some pretty good money by serving up YouTube videos in VP8 format instead of H264. And even better, Google would not have to worry about the H.264 patent owners changing the rates or changing the rules. So it really would be in Google's best interest if all of the YouTube users were able to view content in VP8. But given the head start of H.264 in the market, the only possible way for Google to get everyone to use VP8 would be to release it for free.
I'm happy about this. This is just a win/win for everyone. If VP8 is decently competitive with H.264, and it is completely free, then as shutdown -p now commented, there is no longer any need to choose between good compression and free software. Everyone can have both!
steveha
I bought *my* mac because it came with gcc, perl, apache, CUPS, and X-windows pre-installed on an open source Unix kernel. As a result, I could install just about anything on it.
Fair enough. But you cannot deny the truth that Apple's newest platforms are very much locked down. iPod Touch and iPhone and iPad, all of them you cannot install any software you want; you can only install software officially blessed by Apple. And Apple can and will deny software for capricious and unfair reasons, in addition to denying software for good reasons.
For those of you who haven't beaten yourself with a cluestick recently, the closed platform is not Apple; it is iTunes.
I really couldn't care much less about the iTunes Music Service. With the iPod, you can still install your own music files. Music is less locked down than apps.
I considered buying an iPod Touch to replace my old Palm PDA. One thing I do care about: I want a Palm emulator to run a few legacy Palm apps I care about. Apple's policy is no emulators, ever, on their closed platforms, which includes the iPod Touch. So I won't buy one. I shouldn't have to "jailbreak" my own hardware just to install software of my own choosing.
P.S. So tell me, do I need to be beaten with a cluestick? If so, where am I clueless?
steveha
I don't care whether Google prepares an iPad rival. A whole bunch of new Linux tablets are coming, likewise a whole bunch of "smartbooks" (netbook computers with non-x86 processors).
I'm really excited about the nVidia Tegra 2 chip. Typical power dissipation of about 500 milliWatts, 8 cores: ARM7 "housekeeping" core, dual 1GHz ARM9 processing cores, audio core, graphics accelerator core, video encode core, video decode core, and "image processing" core (which will support a high-resolution camera). nVidia showed off prototype smartbooks with a Tegra 2 playing HD video, and claimed that the chip was dissipating 150 milliWatts; elsewhere I have seen 500 milliWatts as the typical number.
I'm also excited about the Pixel Qi screen. That's the same display technology from the OLPC. A nice-looking display that dissipates 2 Watts when the backlight is on, and about 0.2 Watts with the backlight disabled. If you want to sit outside in the bright sun, you turn the backlight off and you get a nice, readable, sharp display that's very suitable for ebooks and web surfing, but you could watch movies that way too if you wanted.
A typical Atom system dissipates 15 to 20 Watts while operating. That's why netbooks need cooling fans. A Tegra 2/Pixel Qi system ought to have tremendous battery life, especially with the backlight off, and won't need a cooling fan. Win/win.
So, what I want is a tablet and a smartbook with a Tegra 2 and a Pixel Qi screen. I want Linux, but that's no problem, because Windows doesn't even run on a Tegra 2, and I don't think anybody is going to ship a Windows CE tablet. And I insist on a device with USB ports: I want to be able to plug in a keyboard, a mouse, a memory card reader, or USB storage devices.
I imagine that Acer and Asus will both ship products I will want. But the actual announced product I know about is the Notion Ink Adam tablet: Tegra 2 chip, Pixel Qi screen, capacitive multitouch touchscreen, Android OS. It also has an intriguing feature: a trackpad on the back of the device, which allows you to use Flash applications that were designed for use with a mouse (you use a finger on the back to drag the cursor around, and tap on the front with your other hand to click the mouse). It also has a camera that can be flipped around to point at you, away from you, or in between. It was originally announced for June, but recent news casts doubt on that.
By the way, one reason why tablets are the hot new form factor: people who see something that looks like a notebook computer expect it to run Windows, but people who see a tablet device have no expectations. So, there will probably be more tablets than smartbooks.
steveha
I still have a hard time truly imagining what the point of an FPSRTS would be.
Well, I won't try to answer that question in the abstract. I'll just describe how it works in Battlezone.
You are a guy who is there on the planet with your other units. You can give them orders, via radio I guess, or you can do things yourself. Your units have pretty lame AI, but three things they are pretty good at: "follow me", "attack that enemy", "defend the base".
You have some kind of mission on each level. Some of the missions absolutely require you to get out there and do something; other missions could possibly be completed just by you giving orders to other units.
My general approach was to have my units set up a "base" somewhere so they would be safe without me, then leave them. In Battlezone, you have some manufacturing units that need to deploy on a "steam vent" or need to have a solar collector nearby; so, I would find a suitable spot to set up the "base". Once the manufacturing units were set up, I would order at least four or five gun turret units, and I would set them up so that at least two could fire on any unit approaching the base from any direction. I would also order a handful of tanks and give them orders to "defend the base". Then I would order some upgrades built for my tank, to make it into a super-tank, and I would pretty much then just go and solve the problem. From time to time I would get "radio" reports: Base under attack! All attackers destroyed!
Like most RTS games, there was a resource management element. You needed to get "scrap" which could be manufactured into units. Tanks and such needed little guys to drive them, and you had a limited supply of the guys, although if a tank got blown up your guy would eject and start walking back to base; when he got there you could order up a new tank for him. (It was kind of abstract... you could manufacture some more little guys just by building a "barracks", which makes no sense at all.) Anyway you would find a good "scrap field" and order your scrap-collecting units to start picking up scrap. But you also usually needed to order a tank or two to "defend the scrap collectors". The collectors were slow, and clumsy, and dumb... easy pickings for even a scout tank. But on all the levels, you just started with a handful of scrap; you really needed to find a scrap field and get a lot more scrap to be able to build enough units to handle the level.
One of my favorite levels featured an enemy convoy that was going to go through a valley. You would have to take your tank, and use the jump jets to get it up on top of some rocks, and there take out the enemy artillery. Once the enemy artillery was dead, it was safe for you to order your manufacturing guys to run to the end of the valley, set up, build scrap collectors, and start cranking out offensive units. For this level, I liked to build five giant walking mechas (with machine-gun hands) and a bunch of artillery. I would upgrade my tank to have a "spinner" gun, basically my own artillery weapon. Then a whole enemy convoy would run down the valley and get cut to bits by my forces. You had this clock counting down, and you needed to have everything set up before the clock ran out and the enemy convoy arrived.
Another of my favorite levels ended with needing to destroy a complete enemy base. I would set up my defensive base, and then order up three artillery units, and order them to follow me. Then I would go and set them up out of line of sight from the enemy base, and myself pop up and "spot" for the artillery. I would have all three artillery pick one unit on the base and all hammer it until it was destroyed, repeat until out of units. Manufacturing units that are deployed (on a steam vent or whatever) can use scrap to repair themselves; but three artillery units can pound them faster than they can repair.
Another memorable level: you had to get out of your tank and run around, and crouch and hide near where an enemy patrol was expected. T
Figure out what it is that you really like about the game. Then make a game that does something similar, and conveys the essence of what you like.
For example, the essence of "Asteroids" would be a game where you pilot a space ship in 2D, with a simplified physics model (if you stop firing the engines, your ship will actually slow down and eventually stop due to some sort of highly unrealistic "friction" in space) and you busily dodge and shoot things. You could make a game that isn't called "Asteroids", doesn't have vector graphics, and has somewhat different rules, but it would still capture the essence. It doesn't matter if your rocks are kind of ugly or your sound effects are lame, but it does matter if the controls for the ship are sluggish to respond, or the game animation is jerky, that sort of thing. Sound effects and rock graphics are easily upgraded later; focus on the soul of your game. (I used to play Asteroids, and it wasn't because the graphics were so good or the music was so great. In fact, there was no music, although that sort of "heartbeat" sound effect was kind of cool for the day...)
Once you have your core gameplay, you may start having original ideas that may take you in a new direction. Suppose you added gravity to your spaceship game, and the player has to fly in and out of cave networks, shooting little bases and collecting stuff? (That one is called "Gravitar".) Suppose you shoot rocks, but they don't blow up, and little crystals come out and you collect them? Then add a giant lion-faced robot boss... (That one is called "Sinistar".) So, don't call your project some lame name like "Asteroids Clone"; it may not end up being a clone. You could call it some goofy name like "Nexuiz" and thanks to the miracle of the Internet, people would still find out about it (if it's worth finding out about).
Also, here is a meta hint that applies to any free software project: focus on what you are good at, and make something that is usable even if limited. If you make a game that is quite playable, but just has one level that repeats over and over, you may attract a fan base and someone may volunteer to write a new level for it. If your music is weak, someone who is a musician may donate some better music. But nobody will volunteer to take a broken mass of code that doesn't even compile, and help you sort it out. Successful free software projects build a community and some momentum, but you won't get a community or momentum without making something that actually works.
I suggest an informal "agile" approach. Get something working, no matter how limited and lame. For example, a ship that flies around. Then add some feature, and get that working too. Say, rocks. Then keep adding things: collision detection (ship must dodge), ship gun, rocks splitting when hit, a score counter, etc. At each step, get something that works and check it in to a source control system before you go on.
I use an informal agile approach on just about everything I do. If you are making a truly complicated game that needs crazy amounts of design, even then I suggest doing the agile thing... just design the broad outlines, then pick some easy corner of the project and start there.
Especially in a project you are doing in your spare time for fun, this style of developing is a good idea. And in true open source style, consider making all your little incremental releases publicly available. If you are lucky, you may start to build a little community even while you are still at the pre-alpha stage.
P.S. If you are looking for a project, please consider the Activision "Battlezone" game. It was an odd hybrid of a real-time strategy game and a first person shooter, and I enjoyed it thoroughly. If I ever tackle a game project like you are proposing, it would be this.
http://en.wikipedia.org/wiki/Battlezone_(1998_video_game)
steveha
And Microsoft promised to support OS/2 after it sold 2 million copies.
Never happened.
Could you provide us with some sort of reference to support this?
The way I remember it, Microsoft supported OS/2 from the beginning; see here for screen shots of Microsoft Word and Microsoft Excel for OS/2.
At the time, Microsoft had an OS/2 group, and a Windows group, and both groups were trying to get people to write apps for their respective systems. Microsoft was telling people that if their computers had 2MB of RAM or less, they should run Windows, but if they had more than that, they should run OS/2, because it was the future.
Then, in 1990, Windows 3.0 shipped, and it was a runaway smash success; at that time Microsoft decided to throw their weight behind Windows. They cut their famous deal with IBM, where IBM would keep the OS/2 business and support the OS/2 customers, and Microsoft would go its own way with Windows. From that point on, I am not aware of any promises from Microsoft with respect to OS/2: Microsoft was pushing Windows with both hands.
So, if you know something I don't, please provide a link so I can read up on it. Thanks.
steveha
Nice theory, but in practice it doesn't work. You still get bothered again next time.
You sound like an advanced hacker type. Google search for "Linux USB hotplug scripts" and read up. You can control what happens when you plug a device in, and you can choke off the behavior you don't like before GNOME is ever notified that something was plugged in. (I haven't bothered to research this in detail because, as I said, I'm okay with the default behavior.)
What does bonobo even *do*, besides complicate the dependency tree?
Bonobo was a way for GNOME applications to expose functionality and data to each other. It is very similar to Microsoft's OLE, or KDE's KParts. The replacement for Bonobo is that the whole world is using DBUS now. (DBUS isn't just for the kernel to publish notifications to user space; user space processes can also use it to talk to each other.)
http://library.gnome.org/devel/platform-overview/stable/bonobo-corba.html.en
http://library.gnome.org/devel/platform-overview/stable/dbus.html.en
steveha
the ability to use the file manager as a web browser (WHY would I EVER want that?)
Wait, does GNOME even have that? I just tried it in Ubuntu 10.04 Beta 1, and it doesn't work.
On the other hand, KDE has had that for years; Konqueror. (Google it; the top hit says "Konqueror - Konqueror - Web Browser, File Manager - and more!")
I agree with you that I am fine with the file manager and the web browser being two different tools. I guess I don't care if they are merged, but I don't view it as a feature.
As for most of the rest of your complaints, I can't feel much sympathy. When I plug in a USB hard drive, I like that a notification pops up. There is plumbing for you to control what happens; right there in the popup dialog you can choose what you want it to do, and then choose "always do this". At a deeper level, there are config files that let you absolutely control what happens when you plug things in. As for GConf, I like it: it takes every good thing about the Windows Registry and ditches the bad stuff. (Good: a daemon manages the settings and avoids race conditions when multiple processes want to update the settings; also good, the settings are stored in XML text files. Bad stuff in Windows: an opaque binary database format that is prone to corruption... yuck.)
I can't say I'm very excited at the prospect of Gnome 3.0.
Nor am I. As far as I am concerned, Gnome 3.0 should look pretty much exactly like Gnome 2.30. They will be removing all deprecated technologies; things like Bonobo will be completely gone. That's worth bumping the major version number. But I don't want an exciting new paradigm. (I am not happy about the direction Ubuntu is taking, either.)
steveha