Better HN
topnewbestaskshowjobs
Log inSign up

pixie_

1,447 karma · joined Oct 21, 2011 (15y ago) · 383 submissions

Submissions

comment 13y ago · link · parent

yea all API calls are POSTs, the API server allows the static server to request.

comment 13y ago · link · parent

That's really awesome. Lately I've been a fan of a Static+API architecture where the site content is served static and dynamic content is loaded through an API call to api.mysite.com and bound using an MVVM. With caching set, static content is never re-requested and API calls are immediately made when a user loads a page. My server can be a simple event io platform like node, and can handle more requests because it's not building dynamic pages, just directly getting data from the db or memcache to serve back json. Unit testing is simplified because my tests are all integration tests against the same API my webpages use. I can write test scripts to create new users, login, run features and verify the JSON results. Basically use my site from the commandline if I want to, or provide 3rd party api support with no extra effort. I'm not a fan of rest urls mixing data with content requests so I use query params to specify the data to request in the api call. Like homework.com/assignment?id=324324 - when the page loads (immediately from cache) the javascript reads the id and makes the API call to get the content. Anyone else using this kind of design?

comment 13y ago · link · parent

I think it's pedantic to confuse 'americans' with everyone from north/south america.

comment 13y ago · link · parent

Don't be evil!

comment 13y ago · link · parent

They have been working hard on this very issue..

http://techblog.netflix.com/2012/07/chaos-monkey-released-in...

It'll be interesting to see what failed when they put out a statement.

comment 13y ago · link · parent

I lived in key west and always had random people in my backyard inspecting for standing water. Even woke up to a helicopter one morning overhead spraying for mosquitoes. I got dengue in 2010 and it suuuucked, the eye pain is incredible, you can't move your eyes without extreme pain. And at the time I had no idea what it was, and it turns out the awareness of it is still low because many people work in the service industry and don't have health insurance so most people avoid the doctor (like myself) didn't know I dengue until afterwards.. like the article says 5% of people in key west have had it at some point which sucks because if you get it again (and a different strain of it) anytime after in your life then you have a 20% chance of dying.. which I hate thinking about when I travel to costa rica. I got a bug zapper and have been massacring mosquitoes nightly. I dont know why there isn't one on every lamppost. /rant

comment 13y ago · link · parent

'IndieSearch' is even better lol.

comment 13y ago · link · parent

You get 'popularly obscure' results. Which I think is a better name than million short.

comment 13y ago · link · parent

Yea I kinda feel bad for them. They have all these smart looking people on the about page, but the UI is so terrible.

comment 13y ago · link · parent

Linux as a gaming platform, especially for Valve is genius. There of tons of PC games that with a bit of porting (and adding controller support) can be re-released and re-sold to the console gamers. And as we all know console gamers spend a lot more $$$ than PC gamers. And Valve is going to be in the middle of it all, genius.

comment 13y ago · link · parent

Does anyone else think Nasa should be figuring out how to setup colonies on new worlds.. I mean the question of life on Mars (or anywhere else) is a good one, but we'll be able to figure all that out a lot easier if we're there in person. It's no going anywhere.

comment 13y ago · link · parent

When I was a kid I typed out every example in a logo book and learned nothing. It doesn't matter if you type it out or not, either way, learning means going line by line and understanding the code.

comment 13y ago · link · parent

Man I'm so glad to be around right now.. I remember catalogs from the 80s.. what we have now is so incredible compared to then. Feels good man.

comment 13y ago · link · parent

Your right, and I think where this will end up is with 'super aware' pilots. Where the plane does just about everything automatically, but there's a human inside that basically 'thinks' and the vehicle does. Our brains are already better at strategy than the most advanced computers, it makes sense that the vehicle takes care of the easy stuff (like not hitting walls and landing) and the human focuses on the enemy.

comment 13y ago · link · parent

I just tried the iPad mini the other night and was impressed by the office suite included with it. To people who have used it, how does it compare to MS Office?

comment 13y ago · link · parent

Before even clicking the link, I thought to myself, 'What would I pay for a Windows 8 tablet?' Not more than $500 I thought. When I saw they priced it at $900 I laughed. Microsoft is a non-stop train wreck of misery at the moment. It's like Window ME and Windows Vista combined. I hope they come out of this beating with a renewed sense of reality. Maybe shed a few layers of management..

comment 13y ago · link · parent

I agree, I'm more interested in this innovative design than the debate itself.

It gets me thinking as well, like what if people for and against the issue could vote up comments independently. So you get the the agreed talking points on both sides of the issue facing off against each other.

comment 13y ago · link · parent

/proc/cpuinfo for me shows 4 Intel Xeon L5520 @ 2.27GHz

comment 14y ago · link · parent

Yea yea you like the underdog.. have you used windows 8?

comment 14y ago · link · parent

Have some pride in what you do for gods sake.

comment 14y ago · link · parent

I'm not familiar with big orgs. What does active directory facilitate mostly? Like seeing a list of other computers in the company and accessing their drives?

comment 14y ago · link · parent

I'm not arguing against implementing an RPC if that's what you need. My original post describes a super set of JSON-RPC.

comment 14y ago · link · parent

Like any other programming language if you need to update multiple fields, you pass multiple parameters to the function. The URL should be equivalent to namespace/class/method while the parameters are just that - parameters you can pass in JSON format.

comment 14y ago · link · parent

Just because something is GET doesn't mean it can be cached. It's not consistent, and every API call needs to be evaluated individually. The thing with REST is that it treats all functions as a variant of a CRUD operation, while functions may do more than just CRUD or a combination of CRUD operations in a single API call. Imagine if all your javascript functions had to be prefixed with GET/UPDATE/DELETE/etc.. you would feel constricted, and for what reason? Imagine if your function names had data in the call path MyCourse.32423.Delete(); that doesn't look very good does it? 32423 would look alot better inside Delete().

comment 14y ago · link · parent

I'm not saying how the parameters or return values should be formatted other than the fact they're in JSON format. JSON-RPC requires you to conform to their specifications.

comment 14y ago · link · parent

I don't like REST. Making a call to a server should be like calling a function anywhere else - you have your parameters and return value. In REST the parameters are spread over 3 places, the action, the url and the post parameters themselves. It's a much better design to combine all your parameters in one place and keep things simple, for example -

REST version: UPDATE /course/324234 { description: "This is a level 1 course" }

Improved version: POST /course/UpdateDescription { courseId: 324234, description: "This is a level 2 course" }

In this case POST is always used for api calls. Course is the namespace, UpdateDesciption is the method name, and parameters are kept all together as JSON.

comment 14y ago · link · parent

What is it about Japanese companies and their inability to create good online services. 3ds, ps3, psp, wiiU, etc.. so much potential.. xbox live is already a good example of how it's done. A simple copy of that would be 1000x better than what's there now.

comment 14y ago · link · parent

Windows 8 must be the slowest train wreck in computing history, it's been being reviewed as crap for over a year now and they keep chugging along.

It's funny to read all the comments from over a year ago and how nothing has changed since then - http://blogs.msdn.com/b/b8/archive/2011/10/18/designing-sear...

1
8910
13