HNHacker News
TopNewBestAskShowJobs

aGHz

266 karma · joined December 26, 2011

https://github.com/aGHz
submissionscomments
aGHz··on Beginning Node.js Development
> This is because node is nonblocking. It doesn't wait for get_username() to return before continuing.

You misunderstand how non-blocking works. In this case, it -most definitely- waits for get_username() to return before continuing. If get_username itself does some asynchronous calls (like db.query), that's its problem, but execution absolutely waits for your own functions to finish.

I'd recommend reading up more on event-driven programming.

aGHz··on Confirmed: He Who Sits the Most Dies the Soonest
What you're showing here is a very typical fundamental misunderstanding of what statistics is. It's not that they can "state anything", it's that everything they state comes with a confidence interval, so they are -probabilistically- very reliable actually.
aGHz··on How to murder your productivity
You just described Trello
aGHz··on How To Train Your Robot
You can easily compare this to literacy, the ability to control written communication. I'm sure around 1800 many people didn't understand the point, since you could always just walk up to almost everyone you'd want to communicate with. There was no way then to forecast all the implications (esp social and technological) that widespread literacy would eventually entail.

Similarly, programming is the ability to control computation. It's very hard for us to understand just how a society would behave when 90% of the population has the power to create any software tool it needs, to compute sophisticated statistics, and so on.

You'd be hard-pressed to find anyone today who disagrees it was a good thing that (almost) everyone learns how to read and write. I'm also convinced 100 years from now, you won't find anyone complaining about widespread programming ability.

aGHz··on Don't tell me how to enable JavaScript
The OP missed the point: it's a passive aggressive way to get you off the site and hope you never come back. We're already focusing all our energy on convincing normal people why our app is awesome, convincing you why you should also enable JS to enjoy it is very low on the priority list. Not to mention that I already have to test my site in 4 browsers, you want me to now test it for a very small edge case too? How entitled is that?
aGHz··on '9223372036854775807' == '9223372036854775808'
While this comment is beside the point, I'm still curious why this version works the way it does. I may be missing something obvious, but why does JS think those two integers are the same?
aGHz··on PHP: A fractal of bad design
> I haven't worked on any teams. I've always written software solo. What of it?

Well, that means you have zero experience with the majority of concerns expressed in this thread, and so are not qualified to opine on them. You work in a happy bubble and I envy you for it, but in the real world you very very rarely get the go-ahead to refactor old code. So in the real world, you very very rarely get to see a quality code base. In any language, really, but PHP compounds this problem with its idiosyncrasies. But you wouldn't know about that.

aGHz··on PHP: A fractal of bad design
Ok, let me fix that: "The article tries to be a comprehensive list of problems with PHP and @ is an error suppression tool that is notorious for being misused throughout the community".

> I refactor all external PHP code before I place it inside of mine

> You don't like a feature of PHP? Don't use that feature. Simple as that.

I don't know anything about you, but judging from that attitude you haven't worked in many teams. Of course it's not as simple as that. If I had a penny for every time I had to fix someone not checking that strpos() === FALSE, well, I could fund my own startup. You may have the luxury of refactoring all over the place, but the reality out there is that horrible code like this is left to fester until it causes real business damage.

aGHz··on PHP: A fractal of bad design
The article tries to be a comprehensive list of problems with PHP and @ is a notorious one, even if you personally are disciplined enough to avoid it.

Not to mention that I have no idea why the original commenter picked on this. It was listed as one of the 7 or so things that can go wrong with that one single, not unusual line of code. It's not like he had a whole paragraph about why @ is bad.

aGHz··on PHP: A fractal of bad design
What exactly is wrong with giving people ample information to base their decisions on?

As long as PHP will have all these warts, people will condemn it, Get over that.

aGHz··on PHP: A fractal of bad design
Because it's bad for the industry as a whole. Clueless managers are looking exclusively for PHP developers because all they know is that there are a ton of them around. Meanwhile, people who've mastered more powerful tools and can produce more work of higher quality are being excluded from contracts for trivial reasons.
aGHz··on Overthinking
To clarify, I'm not saying over-engineering is a good thing. I'm saying there's a mismatch between the complexity of the problem and the desires/personality of the person having to solve it. Give the simple problem to people who valor elegance, minimalism, simplicity, and keep the MIT PhD for rocket surgery and stuff.
aGHz··on Overthinking
I don't understand why you presume it's a need to defend and justify it to others. Getting a PhD from MIT isn't exactly a walk in the park, I imagine the person got it BECAUSE of a pleasure to tackle complicated problems in the first place.

If I really enjoy dealing with complexity and you give me something really simple to do, well I'm gonna go ahead and have some fun with it. It's not a matter of justifying, it's just that simple stuff is boring to somebody who enjoys complexity.

aGHz··on What the Sabu revelation means for hackers
This. While reading the article, I couldn't help but imagine the legions of extremely bright Russian, Bulgarian, Romanian, Hungarian, etc hackers, most likely orders of magnitude more sophisticated than Sabu, looking at the LulzSec shenanigans with disdain and comparing our western hacking scene with Hollywood and Entertainment Tonight.

That being said, LulzSec et. al. were more about social activism than about accomplished hacking. For a mission like that you really need some mainstream appeal, and for that purpose the newage digital messiah fit the bill.

aGHz··on Blizzard Lays Off 600, Including About 60 Developers
I imagine the implied turn of phrase was actually "struggled to make the numbers". As TheCapn pointed out, an unaccounted for 20% drop in plans is bound to shake things up a little.
aGHz··on Comparing PHP, Perl, Python and Ruby
If you want Python, just use Python ("There should be one-- and preferably only one --obvious way to do it." - PEP 20). Very central to the Perl philosophy is that TIMTOWTDI (though I'm not sure if this is canonized anywhere as clearly as for Python), so your suggestion is ridiculous. I for one found the bless mechanics extremely enlightening with regard to the semantics of object orientation. The feeling I had when I first got that was akin to when I first realized "to be" lumps together the semantics of identity and attribution in the english language.
aGHz··on Who Expected That? Extreme close-ups create a Klein Bottle.
This is a terribly incorrect trivialization of the work they did. The idea is not to observe some meaningless pattern emerge. Instead, they're trying to describe the statistics of random 3x3 pixels taken from photographs of nature (in fact, only of the luminosity of each pixel, hence the black-and-white photos). At a first thought, you'd expect this to be completely random, but it looks like there is a certain statistical structure to it. You only find this structure far-fetched because you're reading a blogger's vulgarization of the scientific paper whose concepts you're not familiar with.

Unlike the unreasonable bible and Moby Dick codes, this has practical applications in image manipulation and compression.

aGHz··on Google to Sell Heads-Up Display Glasses by Year’s End
Absolutely loved that miniseries and recommended it to everyone I know. The second episode also deals with a high-tech future, while the first one explores a more social angle of our current connected world.
aGHz··on Farewell Stack Exchange
You're showing a disproportionate emotional response to a point he didn't even make.

The idea is that as parents, we send subtle signals to our young children about how adult life should be. A father spending 6h a day at work and the rest with their child is preparing a personality potentially lacking a builtin discipline derived subconsciously from observing the parental example.

This has nothing to do with your worries about your death bed regrets. They're valid too, but besides the point the PP was making.

aGHz··on PHP and the Lean Startup
"It's a juvenile playground pissing contest that has nothing to do with craftsmanship." Sadly, you've got me there. There's rich conversation to be had on the topic though, could we come up with ways to make that surface out of the current swamp of language debates?

Although they might not use them, they'll talk endlessly about them. I mention in another comment how I've witnessed very long discussions among my photography and cinema friends about the "nerdy" details of their work. But you're right, there's a lot less emotion than in our community :/

aGHz··on PHP and the Lean Startup
Except you called it "bullshit stacked on bullshit". Debates over languages go much deeper than "5% efficiencies", and what I was trying to get at is that depth is beyond an entrepreneur. Not because of an implied hierarchy, but because you have other concerns in life than learning about the intricacies of computer science. It takes real computer scientists and engineers (i.e. the craftsmen) to understand why it's so bad PHP didn't have first-class functions until whatever version.

For you, as an entrepreneur whipping out MVP after MVP until you strike gold, that couldn't matter less, but for those interested it's a big deal. To jump in the middle of their discussion as an uneducated outsider and judge the whole thing as "bs stacked on bs" is... inconsiderate at best.

aGHz··on PHP and the Lean Startup
It's true that the ultimate judgement comes on the result, but a lot of the arguments around tools have an element of "this allows you to give better results". I've witnessed very long discussions with my photography and cinema friends about the varieties of cameras and other tools they like to use, so I doubt the validity of your statement. I do have to agree that it sounds a lot more intelligent and a lot less like the language bickering we're seeing.

The reason for that brings me back to my original point that there are too many people jumping in the language debates who really have no business being there. It's the equivalent of me trolling my photography friends saying that Sony makes amazing cameras because when I go on vacation I can just whip one out and take a decent shot, whereas the girl who didn't have her 4000$ SLR with her totally missed out on the opportunity. While 100% true, I'm really just derailing their conversation on the relative benefits of their cameras with something completely besides the point.

aGHz··on PHP and the Lean Startup
What a pleasant attitude painfully indicative of a certain kind of entrepreneur that can only see green in the world.

You see, what you call a "certain type of nerd" are actually craftsmen who enjoy things done well. You can be all the IKEA you want, and you're surely gonna rack up some interesting profits. But if I'm the kind of furniture maker who enjoys taking 6 months to build the perfect cabinet, you can be sure I'll pay special attention to selecting tools that I love. And none of your monetization arguments are going to count really.

So the bottom line is that PHP vs Ruby vs Python etc is a craftsmen's discussion. (If it's a serious discussion at all, that is - comparing it to Lean Startups isn't a serious discussion.) Bringing arguments like yours to such a setting just makes you look silly (especially when you think it's about "extreme optimization", then you just look like you really have no idea what you're talking about).

aGHz··on PHP and the Lean Startup
"The only difference is that today it's organized, tested and validated." Unbelievable. Those are the three reasons developing in PHP was such a pain back in 2000: procedural web code was a pain to keep organized, don't even get me started about testing PHP code back then, and at least the projects I was working on suffered from horrible unvalidated feature creep.

Yes, I would say that's the "only" difference. ಠ_ಠ

aGHz··on PUT or POST: The REST of the Story
The biggest one is encoding state exclusively in the hypertext communication (what many people would call statelessness). Most web devs aren't comfortable doing away with sessions, but that's just fine as far as HTTP cares.
aGHz··on PUT or POST: The REST of the Story
Actually you're quite right, yeah. My feeling though is that in cases like this it doesn't really matter what the PUT really does behind the scene. For your API consumer it just changes the user's picture (in some cases from None to one). So yeah, PUT can both create and update in this case, but the consumer has no need to make the distinction between the two semantics.
aGHz··on PUT or POST: The REST of the Story
Are you just HTTP-compliant (using the proper verbs and having Uniform Resource Locations point to actual resources) or are you truly 100% restful?
aGHz··on PUT or POST: The REST of the Story
Aside from my HTTP/REST rant, I think there's a much better discerning factor between POST and PUT. From the HTTP spec:

"The fundamental difference between the POST and PUT requests is reflected in the different meaning of the Request-URI. The URI in a POST request identifies the resource that will handle the enclosed entity. [...] In contrast, the URI in a PUT request identifies the entity enclosed with the request -- the user agent knows what URI is intended and the server MUST NOT attempt to apply the request to some other resource. If the server desires that the request be applied to a different URI, it MUST send a 301 (Moved Permanently) response; the user agent MAY then make its own decision regarding whether or not to redirect the request."

So if you want to create the user Foo and you somehow know about the URI example.com/users/Foo, then you can directly PUT your information to that URI. This URI points directly to the enclosed entity, the user. If you only know the URI of the enclosing resource (aka collection), then you MUST do a POST to example.com/users/.

So that's the semantics of it, PUT deals directly with the resource that the URI points to, while POST deals with a collection of subordinate resources.

However, the REST catch is that if you follow the HATEOAS principle, there's (almost+) no way you would know about example.com/users/Foo. In the REST world, you would (almost) never use PUT for creating, because if that resource doesn't already exist, you would (almost) never get a URI to it by traversing the hypertext representation of the application state.

+ I say almost because you could have something like a GET example.com/users?name=Foo that would return 404 with the URL where to PUT to create this user. Not sure how HATEOAS proposes you get to a URL like example.com/users?name=Foo though, perhaps someone more knowledgeable can pitch in.

aGHz··on PUT or POST: The REST of the Story
The issue this piece exposes is much wider than REST and completely independent of the validity/desirability of REST. The semantics of PUT and POST are defined in the HTTP spec, a much lower level than the architectural one at which REST exists. As such, everyone developing HTTP-enabled code SHOULD (RFC 2119) obey the proper semantics to make sure we all use the same vocabulary. I mean, c'mon guys, there's only a handful of verbs!

This is HTTP not REST. You need to understand this even if you're against REST.

(edited to remove tl;dr. It looked much longer in my text box)

aGHz··on [dead]
I'm so happy to see this progress in the mainstream's view of programming skill. My dream is that some day coding will be like driving a car: pretty much everyone can do it for their daily needs, and those interested can take it to a professional level. You want to access your banking activity in a certain way? It's not (won't be) a big deal to just write a little code to do it your way. Same thing for lifestyle tracking, photo management, everything changes when everyone has the ability to do things their own personal way.

At the same time we can do our part to make that real. We can start with more novice-friendly frameworks, better documentation for things that already exist, and maybe even more specialized languages that are geared towards casual coders.

← PreviousPage 3 of 4Next →