Better HN
topnewbestaskshowjobs
Log inSign up

vec

2,000 karma · joined Aug 9, 2012 (14y ago) · 391 submissions

Submissions

comment 13y ago · link · parent

Needs more <frame>s! And I count a grand total of zero <blink> and <marquee> tags. C'mon people, if you want to party like it's 1999 you've got to step up your game!

comment 13y ago · link · parent

No, but even read only access to private repos is a problem. A lot of that code belongs to my employer and I can't in good conscience grant access to it even if I want to.

I'm not sure why having an empty account is something you care to filter on. If someone really wants to pretend to be a dev, forcing them to click "Create new repo" before they sign up isn't going to provide much of a barrier. You're already basically taking them at their word so I'd recommend just dropping the requirement.

comment 13y ago · link · parent

I think your github oauth request is a bit broad:

    The app Upboat will be able to:

    * Read your public information.
    * Read your private email addresses.
    * Update your public and private repositories (Commits, Issues, etc).
I'd like to register myself as a dev, but I'm not going to agree to those terms. No offense, but you need to do a lot more to justify why you want write access to my github account.

comment 13y ago · link · parent

In other news, sky still blue.

I just spent the better part of a week rewriting a traditional Wordpress plugin to be an AJAX backed AngularJS widget. I have never before seen a system work so hard to discourage you from doing the right thing.

* Need to make an ajax endpoint? Create a global function, call wp_hook to register it twice, and be sure to die() at the end of it. Oh, and you can't selectively register on HTTP verb, plus too bad if you wanted to use the param "action" for anything.

* Want to serve some JS? Great! wp_enqueue_script has you covered. Unless you're plugin is included after the header. Unless unless you pass the optional "place in footer" flag. Unless unless unless the theme doesn't call wp_foot() (which is depressingly common). Good luck!

* Need to serve something that isn't JS or CSS, like a static HTML template? Fine! Just pass the whole path to the file! Since we don't do any routing other than cleaning up permalinks, every file has its own URL! Oh, just be sure to use plugin_dir_url() to get the base path. But despite the name that returns the path to the current file not the plugin so you should probably call it once in your plugin initialization file and cache the result in a global constant or something.

* Looking to do some safe SQL queries? Fantastic! Here's $wpdb->prepare. Which, by the way, doesn't have a named argument syntax. So if you have any optional params or dynamic segments in your SQL then you're going to have to prepare a whole query for each permutation. Oh, and I know you're building your queries by hand, but be sure to use "SELECT * FROM {$wpdb->posts}" instead of "SELECT * FROM wp_posts" just in case the table prefix isn't set to the default.

And that's just off the top of my head. Seriously, even assuming you know the right way to do any of the above (which in an environment that is quite explicitly aimed at being friendly to non-developers is far from a given), actually doing it involves jumping through countless obscure hoops. The simple fact is that making an ajax.php file and starting it with require_once('../../../../wp-config.php') or doing string interpolation into raw SQL, though horrible from both security and portability standpoints, are not only easier to write but make for clearer and more understandable code.

comment 13y ago · link · parent

I'm guessing that it's stealing the small and large grids from Zurb Foundation.

comment 13y ago · link · parent

I think "consistent" is the operative word there. On a desktop app, if I change something it changes the entire experience and only for me. On the other hand, if on my theoretical distributed github host I decide that I hate markdown and I want my comments to use textile instead, then not only do I not solve my own itch (I still have to deal with markdown on everyone else's repos) but I've created friction for everyone else who comes to my repo and wants to comment like they do everywhere else.

Multiply that by several thousand hosts and the friction involved in using, let alone contributing to a project goes up considerably. Having a world where every repo uses the same visual and interaction metaphors and supports the same features is a huge UX win, almost regardless of the quality of that interface.

We used to have something sort of federated for source management. Before Github basically won everyone had their own bugtracker and repo set up. It was not uncommon to spend an hour trying to figure out where they hid the pull URL, then installing whichever version control tool they were using, then fighting with whatever half functional import tool you needed to convert their repo to whatever version control your project had. Then spend another half hour creating yet another account and then fighting with whatever half functional plugin they had installed or trying to figure out the difference between "Critical" and "Severe" just to submit a bug.

comment 13y ago · link · parent

So Github is a good example of why the traditional open/closed dichotomy falls apart on the web.

The things that make Github really valuable are by definition closed. They own a well-known URL and have a ton of content behind it. I know where to go to find projects, I have a consistent workflow for acquiring or modifying those projects, and I have a reliable method for commenting on and contributing back to those projects. Even if Github were completely open and simple to customize and deploy (which are very different things), a fork would have very little of the value we associate with the original.

Not an open/closed issue, but illustrative of the concept: Google+ is a noticeably better written piece of software than Facebook, but no one uses it because that's not where they can see their sister's baby pictures.

This is very different from desktop applications, such as Office. Assuming file interoparability, I can use an alternative that I like better to improve my workflow without losing much value.

So what we really need is to move away from focusing on project source and toward open data. We should be pushing for better and richer APIs for third-party access to large datasets.

comment 13y ago · link · parent

I got the impression that NYC's objection was less about revenue and more about the city's management of housing. New York has a pretty severe supply/demand discrepancy when it comes to housing, and they've taken pains for a long time to try and keep what housing there is available and at least sort of affordable. Having a service that de facto converts long-term residential housing to hotels seems like the sort of thing the city would object to regardless of the revenue implications.

Besides, most of the money that cities get from tourists they get through sales tax or indirectly through property and income taxes on tourist-supported businesses. I would be very surprised if losing the tax revenue on the hotel stay is enough to convert tourism into a net loss for the city.

comment 13y ago · link · parent

Yeah, but we're all geeks here. It can't be that hard to splice together some custom CSS to make hacker news look like whatever you want. Let me just click view source and OH GOD PG FOR THE LOVE OF ALL THAT IS HOLY WHY ARE YOU USING NESTED TABLES IT'S 2013!!?!?!!111questionmark!

Sorry, blacked out for a minute there.

comment 13y ago · link · parent

I'd even go a step further. Do away with welfare, food stamps, unemployment insurance, minimum wage, etc. Instead, move to a basic income[1] system.

Everyone (well, every citizen between, say, 18 and 67, when Social Security kicks in) gets a guaranteed flat income from the government. Then raise income taxes accordingly such that the average middle class family more or less breaks even.

[1] http://en.wikipedia.org/wiki/Basic_income

comment 13y ago · link · parent

Off topic, but it turns out that eagles don't actually sound anything like that. A real bald eagle cry is an amusingly unintimidating high pitched chirp[1].

[1] http://www.youtube.com/watch?v=hlq2kcYQcLc

comment 13y ago · link · parent

325 EUR is a lot cheaper than I was expecting. I'd be curious to know how much of a premium they're paying for ethically sourcing their components. If the percentages are as low as that price point suggests, it gives me a lot of hope for pushing for change.

comment 13y ago · link · parent

It's not an issue of feeling entitled to service. If there were no free email providers, or if the paid services were noticeably better on any of the axes I care about, then I would be happy to switch to a paid provider. But gmail exists, as do scores of other excellent providers with stellar reputations, and I don't see a point in paying a premium for equivalent service just for the sake of being a paying customer.

comment 13y ago · link · parent

Part of the "functionality" was UX. The start menu was designed to be easy to use with a mouse. The layout was compact, it was heirarchical and made heavy use of hover as a mechanic, and it tended to weight important things toward the bottom left quadrant of the screen, where the user's mouse already was. Metro is designed touch-first: full-screen, spread out, no hover events, heavy use of drag and swipe. Yes they fill the same basic need with the same fundamental abstraction, but on a traditional desktop with a mouse as the main pointing device using Metro is a much worse experience.

comment 13y ago · link · parent

Exactly. Good two-factor authentication is not hard. World of Warcraft, for example, has had an excellent real-world implementation for years now. It's actually sufficiently not hard that I'm not sure there's really room for much innovation in that space (unless you count banks actually using it to be innovation).

What I'm saying is we need a better solution for Facebook and HN. There's some large subset of sites for which users will not tolerate a physical artifact or convoluted multi-step process. Within those constraints, and with the understanding that we'll never be able to do as well as 256-bit private keys or two-factor, I'm wondering if we can't still do significantly better than alphanumeric passwords.

comment 13y ago · link · parent

I can't imagine users being satisfied with a solution that requires them to either use a specific machine or have a physical artifact with them to login. It just feels too much like a step backwards when everything else is moving toward living on the cloud. Clef looks interesting, but what's the user story when someone's phone dies?

Every security article I see either tries to drastically expand the entropy of the user's key (password or otherwise) or expand to some sort of two-factor authentication. Obviously that's better, long term, but I get the feeling passwords are here to stay for the foreseeable future. I'd love to see an actually secure authentication solution that can be used by someone with nothing other than their memory. Is anyone doing any work on ways to make authentication more secure with a low key entropy?

comment 13y ago · link · parent

> As the company sold 5,000 cars in the quarter, though, $13,600 per car was paid by other manufacturers, who are going to pass at least some of that cost on to buyers of their products.

The article compares pollution credits to bribery and a shakedown, but I don't quite get the case. Tesla doesn't get them for free, it actually has to produce low emission vehicles. And no one is forcing Honda to buy them from Tesla specifically (or technically at all). Honda isn't prepared to produce low emission cars, so the carbon credits market means they don't have to, so long as they're willing to bear the external costs in some other way.

Pollution credits are a relatively lassiez faire mechanism for converting a specific type of external costs to internal ones, and they seem to function pretty well. Not a leading question, but I'm honestly curious. What is the conservative or libertarian argument against them, and what approach would conservatives or libertarians prefer we took to the problem of large externalities?

comment 13y ago · link · parent

Yeah, feels like it's targeting the people who need this service least. Bay area is geek central, or so it's reputation suggests. I just moved to Albuquerque, which is beautiful and scenic and has no existing nerd scene. A tool like this would be incredible for finding or building one, though.

I don't mean to be the "but what about my edge case" guy, but it really does seem like your target audience is going to be denser when you get into cities that don't have thoroughly saturated tech scenes already.

p.s. If there are any HN types in the ABQ/Santa Fe area, please reply and we can grab lunch sometime.

comment 13y ago · link · parent

Plus since it's (kinda) supposed to be a prequel to NextGen/DS9/Voyager it has to cram itself into that thin wedge between more futuristic than now and noticeably less futuristic than we imagined a decade ago.

comment 13y ago · link · parent

Generally the application itself. Listening on an http port or a unix socket is pretty easy in most modern languages. Then use a normal HTTP server like apache to listen to incoming connections and proxy them on to whatever port on localhost your application is listening to.

comment 13y ago · link · parent

Yes, any half-decent PHP framework will have some solution for this. CodeIgniter, in particular, gets around it with a combination of .htaccess files in every root directory, index.html pages in every subdirectory, and a boilerplate `defined('BASEPATH') OR exit('No direct script access allowed');` snippet at the top of every file. As long as the developer continues this convention through all their additions, this works quite well and is very secure and stable. It's also completely unnecessary. And it breaks if you want to host under nginx or lighttpd or anything that's not apache.

The point is that this is a problem web frameworks don't have to have in the first place. It is relatively easy to fix, if you know how, but it creates boilerplate code and adds potential for security holes for literally no benefit. The ability to heal a self-inflicted wound is a poor substitute substitute for not being injured in the first place.

comment 13y ago · link · parent

Largely because with big business in general, and especially with medicine, modernization is more of a political and economic problem than a technical one. There's been medical records keeping software that's better than paper for 30 years now, but a lot of hospitals still use filing cabinets full of handwritten charts.

Switching systems for a major enterprise is hugely expensive. In addition to retooling and retraining, there's the cost of paying someone the often thousands of hours to import all the existing records. Plus six months (optimistically) of dealing with lost records, transcription errors, and learning curve errors from staff unfamiliar with the inevitable quirks of the new system. Not that this is good for any business, but in a hospital setting that can mean dead patients.

Remember that "I'm to entrenched to make major changes" is emphatically not an engineering problem. Neither, for that matter, is "I don't have the money or political power to get access to technology". They are real problems and need real solutions, but throwing more tech at them is not an effective strategy.

comment 13y ago · link · parent

Of course you can, but most of the time you don't want /blog/index.php?slug=title-of-the-article, you want /blog/title-of-the-article. To do this in a CGI-style app (i.e. mod_whatever) you've got to mangle the URL in the webserver layer. This moves application logic out of the application and into a config file for some other program, so it would be bad even if Apache's rewrite syntax wasn't incomprehensible black magic.

It cuts both ways, too. CGI-style routing gives a URL to everything, whether you want to or not. Unless you explicitly disable it, visiting /blog/config/database_credentials.ini (or whatever) will happily serve that file to the client. Plus it allows any user to execute the code in any file in your system out of context. Admittedly this will probably either error out or do nothing, but can you guarantee that for every single code file in your whole tree?

comment 13y ago · link · parent

Because mod_php is one of the main things that said hackers don't like about PHP. 1 file to 1 url does not scale to even small blogs, and using mod_rewrite to handle routing is both more complicated and less powerful than port forwarding to an app server and letting it handle urls in application code.

I always hear people say this, but I've used both a fair bit and `rails s` plus port forwarding is an order of magnitude easier than fighting with apache's vhost config.

comment 13y ago · link · parent

Speaking as someone who made this exact jump a couple years back, here's the big differences I remember.

* The languages are very different, syntactically. Ruby's blocks and enumerators really don't have an analog in PHP, and they'll take some getting used to. There's also some pretty deep philosophical differences in what the two languages mean by "class". That said, they sit at about the same abstraction layer, so line by line the complexity and flow shouldn't be that big of a jump.

* Rails is more like, say, Zend Framework than raw PHP. It enforces an MVC layout on your code and does what looks at first like a lot of magic to figure out which template files correspond to which pages. When you're starting out the rails scaffold generators are your friend.

* Ruby's standard library has a lot less in it than PHPs, so no XML parser or SQL client out of the box. Gems, and bundler in particular, makes it much easier to add third party code, though. You'll spend a lot more time bikeshedding over which third-party library to use, but the competition generally leads to more pleasant APIs in the long run.

* Ruby convention is to have more files and less code per file. A lot of your template files will only end up being three or four lines long. It's honestly easier in the long run, but get an editor that supports that workflow (multiple tabs, fuzzy file open, find-in-project, etc).

* RoR is almost completely independent of Apache for configuration. You get to move all the logic that was in .htaccess into ruby code in your app somewhere, and you get much more freedom over defining what you want your URLs to look like. You'll need to familiarize yourself with a concept called reverse proxying to figure out how this works in production, though.

* Not strictly ruby, but the rails asset pipeline is magic. Once you get used to it you'll never want to do frontend coding without it.

comment 13y ago · link · parent

Off topic, but 5 words? I know external constraints force creativity and all that, but there's just not that much one can actually say in 5 words. Besides, wouldn't 130 characters (~20 english words) have been more in keeping with the spirit of the evening?

comment 13y ago · link · parent

I've got to say "cool" is not the first word that springs to mind when I think about setting up shop that close to Sol.

comment 13y ago · link · parent

One of my professors in college put it in a way that stuck with me. All source code has to be compiled by (at least) two different machines; the compiler and the programmer's brain. The machines have radically different parsers, but must end up with the same parse tree for the program to function correctly.

comment 13y ago · link · parent

Status cats.

http://www.flickr.com/photos/girliemac/sets/7215762840946712...

comment 13y ago · link · parent

It's idiomatic to use the if so you can do this

    <?php if (have_posts()) : while (have_posts()) : the_post() ?>
      <!-- do loop stuff -->
    <?php endwhile; else : ?>
      <!-- no posts found, show a default or error of some sort -->
    <?php endif ?>
1
1011121314