Better HN
topnewbestaskshowjobs
Log inSign up

makecheck

12,740 karma · joined Feb 17, 2008 (18y ago) · 2,917 submissions

Submissions

comment 15y ago · link · parent

So in a nutshell, we should never have allowed the light bulb to be invented because makers of lanterns were put out of work.

comment 15y ago · link · parent

If you're starting from the very beginning, learn a good text editor. (Editing is such a huge part of programming and has so many other payoffs that it is a very good first step.)

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

I don't think this is a good case against Fitts' Law. Remember that Fitts' Law factors in both the distance to a target and the target's size. The placement of menu bars was originally done on screens so small that the distance factor was insignificant compared to the "infinite size" of the screen edge. The problem now isn't Fitts' Law, it is that the distance factor is a greater proportion of the difficulty in hitting a target and the "solution" for menus has not changed accordingly.

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

Whenever I'm about to make a purchase, a dialog pops up telling me this, and it also requires my password.

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

Generally good advice, though I really don't agree about printf(). First, it certainly is possible to use objects with it; you may need a "%s" and a call to stringObject.c_str(), but it's no big deal.

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

I don't really see how a simple request system can work. What company is going to respect tracking preferences? It's not like anyone would ever find out if they didn't, and their profiling is less accurate if they do.

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

I think software makers have just decided they don't like decimal points anymore. It has little to do with development pace and everything to do with what they feel like calling something.

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

Xcode is $5 on the App Store, but included in either (Mac or iOS) annual developer program's $99.

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

Software depends on its hardware. If the hardware dies, or no one writes an emulator, that program will stop being used. But even if a particular incarnation of an idea is no longer used, it will exist on modern hardware if it is still a useful thing to do (via a port, a rewrite, or even as a dedicated part of the hardware itself). That isn't to say it won't cost more to keep an older design afloat, but it happens all the time.

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

It's important to distinguish C++ expertise from that of other languages. C++ is so large (and with C++0x will be larger still) that any expert you do meet will know at best a large portion of some subset of the language. And this is fine.

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

If you just want a wide sample, I suggest searching open source projects.

For example, Google Code Search: http://www.google.com/codesearch?hl=en&lr=&q=.xcodep...

comment 15y ago · link · parent

I think the point was to learn an API, but it was much more effective as a tutorial on why XML can be an incredibly awful choice for certain things. The noise-to-usefulness ratio in the samples is maddening, isn't it?

comment 15y ago · link · parent

Some corporations go pretty far to save money (reducing workforce, etc.), all apparently in the name of keeping investors happy. Shouldn't there be investors in banks asking questions about these managers' salaries?

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

Lousy use of space is something that turned me away from Windows from the start, and they are still wasting space. Worse though, it is harder to find alternatives that don't; even Mac OS X these days has more and more iTuneseque apps that fill a huge display without adding much. I think I was happiest with Window Maker on Linux or Solaris.

comment 15y ago · link · parent

I think of Microsoft like a talking head on TV; they may be interesting or entertaining if I am bored, but they are just spewing opinions and are not directly involved in the topics they opine about. Microsoft has not taken actions proving that it knows anything about how to market a tablet, so its opinion has only entertainment value.

comment 15y ago · link · parent

For which their lawyer need only dig up that old case file from the DoJ and copy and paste the arguments.

comment 15y ago · link · parent

The law against false advertising probably does apply here, and as such the correct course of action would be to file a suit against the seller. I'd love to see them try to prove that their method actually "cures" something.

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

It updated to 4 for me (on Mac), although it goes in sequential order; e.g. if there's any 3.x you didn't get it seems to update that first, then on relaunch another update-check gets version 4.

comment 15y ago · link · parent

Are you sure it "started" your current version, or did you have an old window open somewhere?

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

Oh I don't know, there are already some pretty odd TLDs: http://en.wikipedia.org/wiki/List_of_Internet_top-level_doma...

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

This is kind of the trick with Apple's stuff...historically they've definitely been willing to blast forward without making backward-compatibility all that easy. The only problem with the Leopard scenario is that it is the last possible upgrade for PowerPC-only Macs, which is an unusually early end-of-life compared to Macs before it.

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

Libel and slander can both have hard evidence (and libel has it by definition because it requires that there be something written, such as a publication of lies and demonstration of damages; slander is verbal, but there can be recordings). They are not automatically thought crimes.

comment 15y ago · link · parent

Well, good...for those still affected by DRM.

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

Remember the good old days when the OS came with a way to edit your desktop pattern? (And for that matter, easily set it to any solid color?)

comment 15y ago · link · parent

Hmmm...well, whatever it does when it loads generated enough CPU to kill my web browser. I saw only a black gradient background and a beachball. I'm not likely to go back.

comment 15y ago · link · parent

I think that whenever there is only a single likely goal (such as "having installed something"), anything more than one command is a problem, and installers are useful.

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

I think this list shows mainly that these kinds of lists are not that accurate or interesting. Let's pick a few from this list: Microsoft, Best Buy, Symantec, Adobe...these are companies that I regularly hear questionable things about.

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

Mac OS 9.2 was released in June of 2001, several months after Mac OS X 10.0. And 9.2.2 arrived after 10.1 had been released.

Sometimes you don't just cut the cord, you evolve the old and the new.

comment 15y ago · link · parent

The problem is, Microsoft and the world don't particularly need an IE9 running on the latest and greatest OS, because there are many excellent, modern choices: Chrome, Firefox, Opera, Safari, etc. Microsoft is kind of wasting its time making an IE9 that focuses only on the latest platform.

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

Microsoft's an interesting beast. Things that "should" matter to them, like Windows, somehow reach the point of almost falling apart (see Windows Me or Vista). Then, groups that are practically losing money build great things like the Xbox 360 and Kinect. Some products that stumble end up dead, like the Zune, while others are dragged back up to par (see IE9 and Windows 7). This current mess could mean anything from "WP7 is doomed, sell your stock" to "the Eye of Sauron just hasn't shone on that product group yet". We'll see. Personally, I'm thinking WP7 will pull a Vista or two and then become a cool phone OS, but the competition isn't standing still either.

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.

1
707172
98