Better HN
topnewbestaskshowjobs
Log inSign up

makecheck

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

Submissions

comment 10y ago · link · parent

Storyboards should have been multi-file from day one. Even if I didn't have issues with revision control, etc. I don't like the idea of a single corruptible file format encompassing the whole universe (all it takes is for Xcode to one day decide it can't open the file, and you lose everything?). This single-file risk happens with other GUI environments too (e.g. in Qt Designer it is quite easy to jam a lot of stuff into a single interface file; you have to go to extra effort to logically separate things into different frame classes or something so that they can live in different files).

comment 10y ago · link · parent

I've seen a lot of scripts written in my career and most of them do things that scare me. It boils down to “explicit is better than implicit”, and there are too many lazy or careless developers out there.

Another good reason to demand open-source, to have a fighting chance that someone has proofread what is about to ask for admin privileges.

More than once I've seen people using "rm -Rf" habitually whether the target is a file or a directory, because it will basically always work (remembering when to use "rmdir" is apparently hard). Well, great...now the side effects of using "rm -Rf ${dir}/${file}" where there's an undefined variable are just a bit ridiculous when all you wanted to do was delete a temporary file.

comment 10y ago · link · parent

A central-hub choice of implementation shouldn't be confused with a centralization requirement however. It is possible for distributed systems to still converge on things (indeed, entire papers have been written on the problem of distributed “agreement”), it's just that they must work in a very different way.

Indeed, we had this, in the form of NNTP and older news servers; those servers essentially exchanged copies of whatever was posted from around the Internet. If there were no news.ycombinator.com, there could still be a wide variety of servers that constitute “hacker news” around the world, that come to a general agreement on what the collection of posts should be. At any instant in time, not all servers will be 100% identical but for all practical purposes they would be.

comment 10y ago · link · parent

Well one thing to consider is that a great many countries have managed to do it so we aren't exactly charting scary new territory. We've essentially been told that this has succeeded so the real question is why haven’t we at least tried our own version of it?

Every single job or project has the risk of eventually being taken over by less competent people (or at least, people who didn't understand the entire original vision). Every taxpayer has to live with the fact that he or she won't agree with everything the government does with money. I would have personally loved to have contributed no tax money at all on the military wastes of the last decade, for example. Taxpayers don't really get to choose at a low granularity, otherwise everyone would find some way to cherry-pick to the point that nothing big could get done.

The way to fix it is to put skin in the game personally. Quit your job and apply to work for the government; or, write to a congressman and really press on them that you consider this important; or better yet, tell 50 of your friends and get some network effects; or join some larger group that petitions for change (as so many other groups do).

comment 10y ago · link · parent

One of the most ironic things about GitHub is how it seems to have spawned centrist systems despite being named after a distributed system.

Much like key servers allow people to determine authenticity in a somewhat-decentralized way, there ought to be a similar way of determining the “authentic” sites for various projects/people or the official places to log issues, etc. Then, the whole network can figure out where to find things, whether or not GitHub or something like it exists, and we can stop asking or expecting GitHub to provide every feature that we need.

As one commenter on the page put it, GitHub is a place for posting a sort of software résumé and is an “expected” way to determine what people have contributed to. Why? Git itself is decentralized; the whole point was supposed to be that somebody's code might be almost anywhere...and yet, an ecosystem of centralization emerged.

Similarly, when GitHub went down awhile back, all these things were affected. Why? Why did people set up systems that depended on the ability to download from GitHub, for instance?

comment 10y ago · link · parent

Bernie's real expectation is that things will get better if people get off their butts and take action. I doubt he believes that government programs will be magically efficient and effective without the right people to make them that way.

Government jobs are available. You can't really complain about something being "managed so poorly" unless you're one of the people in that organization trying to make it better.

Currently the U.S. has a system where doctors' offices need SEVERAL full time staff just to deal with insurance companies, which is insane and nothing like what I have seen elsewhere.

comment 10y ago · link · parent

It's kind of cool, so many things (computers or otherwise) have padding built in.

Remember BASIC, the classic 10/20/30 line numbering scheme? Don't want to be caught without room to expand your program.

Microprocessors manufacture in extra gates in case they need to fix something.

Even in large construction projects you see evidence of mystery tunnels, pipes and other things that enable post-construction changes. Some of the road fly-overs in my area have branch points that are only connected in one direction (since obviously it would be ridiculously hard to retrofit the piers at the intersection 10 years from now to add a road going the other way).

comment 10y ago · link · parent

Please stop linking to the page-that-talks-about-the-page.

They're actually referring to this Quora page: https://www.quora.com/What-should-I-do-if-the-pilot-passes-o...

comment 10y ago · link · parent

Good point. Although, unless there are shells that have "tput" built-in, that means more subprocesses to obtain basic information (which would slow down the result a bit). In my case, the environment is sufficient to figure out what to do.

comment 10y ago · link · parent

I love what Daring Fireball does; simply a paragraph describing some sponsor: who they are and what they do. I find myself reading it every time and even being interested. I can say with 100% certainty that I have never had that reaction to any "traditional" ad however.

comment 10y ago · link · parent

I handle this in a way that is more agnostic to the type of revision control, and fully flexible in coloring (using the most powerful scheme available).

For example, I shouldn't have to put up with basic colors if the terminal can do better.

Here is how it works; starting with:

  #!/bin/bash 
  if [ -r ".svn" ] ; then
    exec svn diff ${1+"$@"} | my_colorize_diff
  else
    git diff ${1+"$@"} | my_colorize_diff
  fi
...where the "my_colorize_diff" script at the end of the pipe is as follows:

  #!/usr/bin/env perl
  # by Kevin Grant (kmg@mac.com)
  my $term_program = (exists $ENV{'TERM_PROGRAM'} && defined $ENV{'TERM_PROGRAM'}) ? $ENV{'TERM_PROGRAM'} : '';
  my $term = (exists $ENV{'TERM'} && defined $ENV{'TERM'}) ? $ENV{'TERM'} : 'vt100';
  my $is_xterm = ($term =~ /xterm/);
  my $is_24bit = ($term_program =~ /MacTerm/);
  print "\033#3BEGIN DIFF\n";
  print "\033#4BEGIN DIFF\n\033#5";
  while (<>) {
    if (/^\+/ && !/^\+\+/) {
      if ($is_24bit) {
        print "\033[48:2:150:200:150m", "\033[2K", "\033[38:2::88:m", "\033[1m";
      } elsif ($is_xterm) {
        print "\033[48;5;149m", "\033[2K", "\033[38;5;235m", "\033[1m";
      } else {
        print "\033[42m", "\033[2K", "\033[30m", "\033[1m";
      }
    } elsif (/^\-/ && !/^\-\-/) {
      if ($is_24bit) {
        print "\033[48:2:244:150:150m", "\033[2K", "\033[38:2:144:0::m";
      } elsif ($is_xterm) {
        print "\033[48;5;52m", "\033[2K", "\033[38;5;124m";
      } else {
        print "\033[41m", "\033[2K", "\033[37m";
      }
    } else {
      print "\033[3m";
    }
    chomp;
    print;
    print "\033[0m\n";
  }
  print "\033#3END DIFF\n";
  print "\033#4END DIFF\n\033#5";

comment 10y ago · link · parent

The thing is, design is supposed to mean "how it works" (and not just fonts, etc.); they're just not designing anymore. When Jony Ive once said in a video that things should look like they haven't been designed, I thought "yeah they sure look that way, they're crappy now".

I shouldn't have to turn on half of the Accessibility settings to return to what I'd consider a normal interface, either. (And the real problem with any non-default setting is that many apps clearly don't test with that; e.g. with the "bold" or "larger" font settings, a lot of things start to truncate or just not lay out as nicely.)

comment 10y ago · link · parent

Definitely should download Alfred (on Mac App Store) as a replacement for Spotlight. I use it basically for launching and quick math, etc. but it can do almost anything.

It doesn't have any of the slowdowns that Spotlight does, and it still has a small interface by default that can move anywhere on the screen.

comment 10y ago · link · parent

The very existence of any "fast lane" should automatically call into question every single security procedure that is disabled by the fast lane.

After all, there is not a single criterion for TSA PreCheck that couldn't be met by someone wishing to do harm. Proof of citizenship, etc.? (Right, because none of the thousands of people currently in prison are citizens.) Fee required? (Sure, because terrorists couldn't possibly come up with the cash.) And so on.

Since someone with ill intent would clearly be capable of achieving TSA PreCheck status and bypassing some of the checks, the passable "security" checks therefore must not be important by definition and should be automatically discontinued.

The really sad thing is, I've observed that it bypasses the ultra-expensive scanners in most situations too. So they're essentially admitting not only that a lot of their checks waste time but that the things they spent obscene amounts of money on are also not necessary.

comment 10y ago · link · parent

Frankly I think a big part of their quality decline is their approach to bug tracking. And maybe their internal bug tracker is just as bad as their external one.

If you want me to bother to help you find bugs in your system, you have to make it easy to file bugs and you have to make me feel like part of the team when I do that. Apple does not.

Before I even get into interface issues, let's just say that Apple's bug reports are like a ginormous black hole. I've filed plenty of bugs that have never been properly closed or even updated, and it makes no sense. In any other system I've seen, you would at least be able to see that your issue had been assigned to someone, and given a priority, etc. Apple has none of that.

The only thing worse than filing a bug that no one responds to is having to spend 20-30 minutes writing it in the first place, and Apple excels there, too.

Their reporting system is too complex (too many fields that should not be necessary, especially the ones that seem to ask the same question twice). It's not automated in any way. It is not integrated with the OS; e.g. why can't I turn on a "developer mode" on my Mac or i-device that lets me instantly do things like "compose new bug report for this OS version" or "compose new bug report for this version of this application", etc.?

Also, despite Apple's attempt to redo the web interface a few years back (because developers had complained endlessly about the even-worse previous bug reporting page), today's web interface is still mostly a repaint to look iPhone-like. It doesn't really address core usability problems. It has created new ones though; for instance, right at the bottom, right where you'd expect to say "submit" and send in your last 20 minutes of writing, is the DELETE BUG AND OBLITERATE FOREVER button!! I once destroyed a bug report that I'd spent a long time writing and I was extremely frustrated. It made me instantly decide that Apple didn't really need to see my bug report after all. And that is a broken system.

comment 10y ago · link · parent

I've noticed that iCloud has a really hard time removing things. For instance, I've tried to delete some "keyboard shortcuts" for about a year now and every few weeks it manages to restore every last one to all of my devices. It doesn't seem to matter if I explicitly delete them from all devices.

Every cloud service needs a "delete, damn it, I really mean it" option, otherwise it seems their sync mechanisms are too conservative and resurrect things forever.

comment 10y ago · link · parent

C++ has definitely changed in important ways, and I continue to use it for several things (both to manage legacy code and by choice for newer code).

Having said that, C++ really, really needs to start throwing out its bad ideas and creating sane defaults that mercilessly break backward-compatibility. This applies throughout the standard library and the language. It can be done in phases (e.g. identify bad behavior; introduce an opt-in compiler mode per file to change defaults and not allow the bad practices; wait a few years and change the default; wait a few more years and remove the old mode forever). C++ also really ought to provide a standard way to partition unsafe behavior from safe behavior; the vast majority of programs do not need the crazy things that are possible in C++, and it shouldn't be a big deal to require extra keywords or compiler modes to enable dangerous language features.

comment 10y ago · link · parent

I don't think we should promote "expected to announce" articles.

Please just report on things after they happen.

comment 10y ago · link · parent

Ads are only barely tolerable in the first place because they might deliver revenue to the owner of the site you're visiting. If the browser replaces real ads with its own, then it is no better than the scummy ISPs and WiFi access points that pull the same tricks.

Also, have we not learned by now that the proper way to add to the web browser experience is through an extension? There's no reason to install an entirely new browser for one feature that is already covered by extensions in other browsers. Develop an extension and expect people to continue using the browsers that they have.

comment 10y ago · link · parent

This is why I hate sites like Facebook exposing a thousand "settings" to "control" my privacy; any one of them is just a small bug away from not doing what it claims to do. And the more stuff that's going on, the less likely it is that I may notice when something has slipped through that shouldn't have.

These privacy mechanisms should be far simpler, vetted for security, and ubiquitous. Consider the physically separate "secure element" chip on your phone that stores data in a way that nothing else can possibly reach, for example. It should be accepted practice in the software industry that your new app doesn't just get to invent some way of storing potentially-sensitive information; there should be a clear place to toss it in a vault under user control, where the user can see everything you have stored even if your application isn't open (e.g. OS X Keychain).

And yes, this is an argument again for open-source software. Proprietary secrets be damned, there's nothing special about a web browser anymore. The code should be visible so as many people as possible can ensure it is correct.

comment 10y ago · link · parent

Edit the subject of an E-mail that I receive. That way, it can be made more sensible to me, or categorized more automatically. (I typically use Apple Mail.)

comment 10y ago · link · parent

20% time is important because not everyone has a ton of free time to improve their skills and do whatever they want to.

People with families, hobbies (that aren't programming), classes to take, or even extra-long commutes are not overflowing with time to devote to side projects.

comment 10y ago · link · parent

For me the hard part is keeping information together and going back to it later.

Chat will always be too temporary to compare to more manageable things like E-mail.

Was an entire conversation captured in the comments of a bug report? Was it captured in an E-mail thread? Was it discussed elsewhere? Or more likely, some crazy combination of all possible communication methods...

E-mail is only a problem because no one seems to improve the tools anymore. (Or they get worse.) There is plenty of room to innovate, still. Why, for instance, can I not even edit my E-mail subject lines...must I be forever cursed just because someone chose "Re: " as their entire subject? Also, it's great that E-mail clients usually correctly guess what a thread should be but why can't I manually intervene and make or modify my own threads? Why aren't there literally dozens of more options for rules and filtering?

comment 10y ago · link · parent

Bad software survives because major investments by large organizations were made in tools that had closed (and even platform-specific) file formats. At the time, maybe no one fully understood the gravity of the investment they were making. Since the data is hard to interpret consistently, competition is practically impossible.

Regulation of software is overdue. I can think of a few rules off the bat that would make a huge difference in spurring the development of quality software:

1. New software files such as documents must be stored in a format that can be read without ambiguity by modern machines, adhering to all regulations.

2. Executable specifications for all interpretations of file formats must be provided publicly, since broadly-available cross-platform execution environments (e.g. Python) are now widely available. In other words, you're not allowed to obfuscate what your file format does by publishing a 500 page document to explain how a single spreadsheet row is interpreted; you must instead provide, for example, a short Python script to illustrate the exact behavior, that anyone on any system can inspect and run.

3. Auditors must be able to correlate your software's interpretation of files with your executable specifications. Any discrepancies require the software to be updated, for as far back as issues have been found.

4. Software is prohibited from re-saving any file in an older format that does not adhere to regulated behavior. Users are not permitted to avoid this type of auto-upgrade, any more than they are permitted to continue wiring their houses with last century's electrical codes.

5. Software may not depend on the behavior of machines or methods that are impractical to obtain (e.g. "what Windows 95 used to do here"). If existing formats have such restrictions, they must upgrade according to the step above.

comment 10y ago · link · parent

Just as a matter of efficiency...a recursive "grep" to hit every file in the tree is going to take far longer than it needs to. The "find" command knows how to be selective.

Try something like this:

    find /Applications -name '*.plist' -exec grep SUFeedURL {} +

comment 10y ago · link · parent

Sometimes a long name is just a hint that the code wasn't factored enough.

For instance, the phrase "outputImageProviderFromBufferWith..." suggests that the Buffer concept should have been a separate thing (probably its own class), that OutputImageProvider could be constructed from.

comment 10y ago · link · parent

A general accounting question...do all companies count revenue the same way for scenarios like:

- Product is purchased by store.

- Customer actually buys product.

- Customer returns product.

- Unsold product is returned by store.

In other words, I don't know how to compare this to anything else because I don't know if it's counting units that didn't reach real customers, or if the announcement would be a lot different two weeks from now after some people return their Christmas presents?

comment 10y ago · link · parent

A lot of good points about the language. I use Objective-C++ too, and it has been very convenient even before Clang came along.

One problem though (which I found years ago but I believe is still true): Objective-C exceptions did not properly call C++ destructors. This can hose RAII objects when an NSException shows up unexpectedly. The work-around I found was to essentially add a "@catch" in key areas and manually tear down key objects but I never found a perfect solution.

comment 10y ago · link · parent

If the pros/cons are apparent, rank those items. An obvious problem (like a big cost difference) may speed up the decision.

If there's time, prototype both; explore any claimed advantages and find some disadvantages. This will make any decision easier to accept.

If the two developers are regularly coming up with "equally good" solutions, consider alternating their decision power on projects (e.g. project A, developer 1 gets to decide; project B, developer 2; project C, developer 1 again...).

comment 10y ago · link · parent

I would guess that this method was created by a code generator, starting from a data structure with all of those fields.

More generally, a long initializer (or class method that returns an autoreleased object) is a fairly common pattern in Objective-C because it provides a common piece of code that all other initializers can call. There is usually some more obvious and convenient choice available, to avoid calling the horrible method directly.

1
525354
98