12,740 karma · joined Feb 17, 2008 (18y ago) · 2,917 submissions
comment 15y ago · link · parent
Use a forgiving and simple language like Python, and ideally an operating system where the tools you need are already installed.
Learn the documentation systems for your language of choice. For instance, in Python, you can go to http://www.python.org, run the command-line "pydoc" tool, and use the "help" function in an interactive session.
Use things like StackOverflow and Google (i.e. learn how to find answers and ask questions). These days, help isn't too far away.
Choose some programming goal, even that goal is something arbitrary like reading 20 lines of a text file and printing all the words that start with A. Make yourself write programs that achieve arbitrary goals so that you're satisfied with how well you're learning the language. Do this for a few weeks before you attempt anything remotely related to the "real" reason you learned programming.
comment 15y ago · link · parent
Personally, I think the distance problem is solved by adjusting the pointing device's tracking speed and acceleration. I've never had any trouble "throwing" my pointer to the edge of a screen on a large monitor. Most mice are perfectly capable of doing rapid acceleration while still allowing precise stops.
comment 15y ago · link · parent
It is hard to imagine how Apple can be sued over this, even in a parents/children situation, because the device is clearly set up to make it difficult to purchase by accident. You are supposed to know what you're doing.
Apparently this lawsuit comes from parents who turned off all the warnings on their device and handed it to their children. Sorry folks, time to do your own parenting and not rely on the law to do it for you.
comment 15y ago · link · parent
There are many reasons to prefer printf() variants or other functions that use format strings, over the "standard" C++ stream mechanisms.
The main reason is that they're actually more convenient than stream classes in many cases. It is easier to see at a glance what the output will be, and it is a hell of a lot less kludgey to make certain things work. You also don't see stupid type problems like I did in a recent Linux port, where "object << std::string" had worked fine with one compiler and OS but not the other (an "object << C string pointer" definition was temporarily needed to bridge the gap).
C++ streams encourage code that constructs a lot of temporary objects; just look at the tricks required by standard-library implementations to get manipulators that take arguments, like "setw(int)", to even work! It is not impossible to avoid this, but programmers are not likely to, which makes it a bad paradigm.
Though not possible with printf() itself, format strings in general are more flexible than sequences of data. For instance, localization-aware code uses format strings because it's very important for another language to be able to say "%d %s" even if the English version uses the ordering "%s %d" (see for example CFStringCreateWithFormat() on Mac OS X, where substitutions can be placed arbitrarily). You also want to be able to swap in an entire translated string, and not have to piece together tidbits that are in between "<<" operators.
About the only defensible use of streams is for files, because by default they support RAII and make it a little easier to automatically clean up. Of course, it takes 2 minutes to write a wrapper class that does the same thing for any other kind of file representation, and then you have exception safety anyway.
comment 15y ago · link · parent
Browsers are already becoming bloated again. This feature only matters if it also automatically does things like: refusing to store any cookies from any related domain, and automatically disabling Flash and other plug-ins that could also perform tracking.
comment 15y ago · link · parent
How many other things are overhyped? AT&T's 4G, somehow much better than 3G? iTunes version 10, despite having the features of an iTunes 4? There are no rules, so no marketer follows any.
comment 15y ago · link · parent
What's more, so far App Store software updates have been free. So even if you paid $5, it may be the last $5 until Xcode 5, if ever.
If you've ever had to build GCC from scratch, you'd be willing to pay $5 just for that. And Apple gives you an IDE and by far the best interface to performance tools I have ever seen (Instruments).
comment 15y ago · link · parent
Some forms of emulation are not even obvious to end users. For instance, there is an alarming amount of effort spent on Windows operating systems and the Intel architecture to enforce decades-old decisions so that programs expecting certain behaviors don't require code changes. You may not know it when you run something, but its very ability to execute can be the result of a hack upon a hack at both the software and hardware levels. It's not even that uncommon for a platform to say "if program A, apply hack X; if program B, apply hack Y; else hack nothing".
comment 15y ago · link · parent
The most important skill is general problem solving, and for this a variety of tools is helpful. So in the C++ world, focus on a few language features that are most different from one another. Make sure you know basically how templates work, but don't fret if you've never seen a specialization or any of the 44 corner cases that are unsupported or undefined. Learn at least common STL containers like vectors, sets and maps, and learn basic_string. Expose yourself to at least one algorithm like fill_n(), and recognize how it is different for vectors versus C arrays. Learn ostringstream. Use namespaces, and learn about the "using" keyword. Learn the basics of classes, constructors and destructors, and the RAII technique. Master all of this before exploring the messes that are inheritance and exception handling.
comment 15y ago · link · parent
For example, Google Code Search: http://www.google.com/codesearch?hl=en&lr=&q=.xcodep...
comment 15y ago · link · parent
If I were a major shareholder, the first thing I'd demand is that a test of managers' worth be done. Set up a few theoretical funds with spreadsheets, full of what-ifs such as how much money is invested in total, and with goals for each fund (such as a certain amount of gain, or safety). Then, take some people with minimal finance experience, like new college grads, and pay them $50000 a year each; pit them against the hedge fund managers for the same funds.
For a few months, everyone has to try to work those fake funds; they must use real market values and suggest decisions based on real data, but obviously the funds contain no real money and the effects would just be calculated. Here's the best part: since the real managers are making over 100 times what the grads would make, they had better have some pretty damned impressive results. If the grads come anywhere near what the managers do, the managers will automatically have their pay docked accordingly. In other words, if they aren't astronomically better when applying their "experience" to a few simple tests, why the hell would any investor continue to tolerate paying these managers so much?
comment 15y ago · link · parent
comment 15y ago · link · parent
comment 15y ago · link · parent
Without this option though, there's not really anything we can do. If someone believes this is worth selling, and someone else believes this is worth buying, then we're not in any position to tell them what to do with their money.
There are all kinds of scams and other ways buyers can get into trouble, and I certainly won't defend scams (I hate all of them). But in the end it is the buyer's responsibility to call "B.S." and decide not to buy something. Apple can't be a parent to everyone. Even if they could be, what would happen as soon as you step outside the App Store and find something on Amazon or in a brick and mortar shop?
comment 15y ago · link · parent
By default, Firefox sends a new-window message to any running Firefox instead of spawning a new one.
Try killing all existing Firefox windows (e.g. "killall firefox" or "pkill firefox") and run it again.
comment 15y ago · link · parent
Why do we even have ".biz"? And why do such arbitrary things as ".museum" exist, when there's no ".fruitstand" or ".bodyshop" (much less the fact that non-English speakers would probably hate to have full English words stuck in their domains)? It's that kind of hacking of the DNS that makes me wish someone else was in charge.
Even country codes are somewhat meaningless, now that people have managed to repurpose things like Tuvalu's domain (".tv"; gee, never saw that coming).
In other words...even though certain domains are supposed to be used for certain things, you really can't depend on that anymore because there are exceptions for whomever has enough money. It might as well be "www.mycompany.sdfdsfsdfds" for all the good it does.
At this point, I honestly think it would make much more sense to create TLDs that are a single letter (in any language) that indexes every site starting with that letter. So "apple.a" gets you to Apple, "microsoft.m" gets you to Microsoft, and "ébb.é" might get you to École Bilingue de Berkeley. This also implies that the TLDs don't have "owners"; there's nothing special about any of them so they are registered implicitly, and no one can set any rules because any site that starts with "b" goes in ".b", etc.
comment 15y ago · link · parent
Somehow I have managed to keep a program working from Mac OS X 10.3.9 onwards (an OS that is PowerPC-only without support for universal binaries). And this accomplishment has required a lot of creativity, to put it mildly. As Alfred's author says, simply choosing the latest OS makes it a lot easier to do cool stuff; I can't easily use Core Animation or other newer technologies. Also, Xcode 4 has finally give up on me completely, so I use Xcode 3.x.
If I were a conspiracy theorist I'd almost think it was designed obsolescence, since there are times I swear I could support another entire OS revision if not for just 1 or 2 missing APIs. From this point of view, open-source has a big theoretical advantage because a couple of missing APIs are technically easy to back-port (but Apple has no reason to spend time on this).
I am glad we at least have Objective-C now, though. There are pretty powerful ways to check at runtime if almost anything will work before you use it, which allows for rather flexible binaries. There have been various ways to do this for C++ APIs beforehand, but Objective-C is much cleaner in this area.
comment 15y ago · link · parent
comment 15y ago · link · parent
I've managed to avoid DRM in an even simpler way: I consume far less content than I used to. And I have only the DRM-using companies to thank for that. When I finally took stock of my free time and realized what a waste it was to sit on my ass for 2 hours to passively absorb even one stupid movie, I basically stopped. Sure I watch things now and then, but nowhere near as much as before. I can pretty much guarantee that had there been no ridiculous roadblocks making it painful to consume content, I'd still be buying more than I do now. I wouldn't have seen a reason to change. So, thank you media companies; your intense desire to not be in business has helped me free up some time.
comment 15y ago · link · parent
But any site that gives a list of 25 commands is Doing It Wrong. The whole point of a script is to perform sequences of commands, and a link to a script is just as useful as an installer GUI would be. Except that it's actually better:
- When a script is used, it seems more likely that someone has actually run it. (Who knows if they've updated their document?) There also won't be copy/paste errors.
- A script is transparent; an installer isn't (even when it dumps logs, they're usually a bit vague). It's easier to see that a script will work, and easier to explain what happened if it didn't work.
- Many people don't want step-by-step or excessive explanations, and a script nicely solves this through embedded comments and code. If you need explanations or details, there's a place for them that's out of the way. And if you don't, you can blindly run the script. It's a nice separation.
comment 15y ago · link · parent
And to top it off, from the site...
"A methodology committee of leading attorneys, professors, government officials and organization leaders, assisted Ethisphere in creating the scoring methodology for the World’s Most Ethical Companies awards."
Great...because when I think of ethics, I can't think of a single attorney, professor, government official or leader who's run afoul.
comment 15y ago · link · parent
On XP, Microsoft could add tons of value by supporting a solid IE9 update. This is where browser improvements are truly needed. Let that be where their engineering talent goes.
You're right that forward-looking IT groups are already well aware of how to deploy a modern browser. It's the other companies I'm wondering about.
Consider what would happen if Microsoft announced these plans, and basically said that in 6 months they would start deploying IE9 by default on XP "for security" (which would basically be legitimate). Once both IT managers and contractors alike can see Microsoft's plans, the writing would be on the wall, like a mini-Y2K; there would be plenty of people you could call to have your broken IE6-only web apps updated, probably enough to keep the prices reasonably low. Obviously I'm speculating on that, but my point is that Microsoft is in the best position to set this ball rolling. A lot of the problem could solve itself. Putting IE9 on another OS isn't really going to tempt anyone using these ancient PCs.
comment 15y ago · link · parent
When Apple was launching the iPhone, they pulled engineers from their flagship Mac OS X to work on new phone software. They seemed to think it was pretty important to launch with a strong product and have all the details right; to them, even delaying a product from another part of their business was an acceptable risk. When was the last time Microsoft did anything like that? Instead of slapping together product groups to shove their way into every has-been market, they could stand to divert some developers, developers, developers to products that need a polished launch, such as WP7.