HNHacker News
TopNewBestAskShowJobs

miguelpais

170 karma · joined February 10, 2009

submissionscomments
miguelpais··on I'm not sure you've really got this whole Object-Oriented thing down quite right
While reading that pile of code I couldn't help parsing it as Java, although syntactically it could be a wide variety of languages.

Are there any other languages' libraries with complicated designs like that one or is this a problem specific to Java?

Just to give an example, this is a snippet of code I had to write dozens of times in a college project using the javax.xml.soap library to create a simple soap message with a tag on it:

  MessageFactory mf = MessageFactory.newInstance();
  SOAPMessage soapMessage = mf.createMessage();
  SOAPPart soapPart = soapMessage.getSOAPPart();
  SOAPEnvelope soapEnvelope = soapPart.getEnvelope();
  SOAPBody soapBody = soapEnvelope.getBody();
  Name name = soapEnvelope.createName("HelloWorld", "hw", "");
  SOAPElement element = soapBody.addChildElement(name);
  element.addTextNode( "hello text message" );
It's not exactly the same issue has in the example on the blog post, but I think it also represents something that could be a lot simpler/shorter.
miguelpais··on I think Twitter’s OAuth-only Access is a Waste of Time
I have made exactly the same thing! But now I guess I'll either read their documentation or use one of the scripts/libs listed above.
miguelpais··on Apple's ping is a big pile of steaming dung
> But if it doesn't, and I want to impress people by showing that I listen to it, and there's no way to do that on Ping except by buying it from iTunes.

Actually, there is. In my opinion it is a very bad way to do so, but you browse on the ITMS to the music you want, click on the down arrow and click on Post. Then you can add a message and it will be appear on your Profile.

But as I said in my comment[1], they should have made all that accessible from within my library!

[1] http://news.ycombinator.com/item?id=1659902

miguelpais··on Apple's ping is a big pile of steaming dung
I was still thinking of giving some credit to Ping when I saw, after being disappointed with all the other features, that you could post a music to your profile. That's something that I quite regularly do on my Facebook profile, simply post a youtube video of some music I like so I can share it with my friends.

I quickly went back to my library, right clicked on a song and searched for some Post button. Unfortunately, as I was soon able to find out, you can only do that inside the ITMS. Of course, some of the songs I have on my library are not in the ITMS, but they could still figure out an automatic way of matching the artist and track name, ask me if one of the matched songs is the one I'm talking about and post it.

As a result, Ping, instead of being that brilliant last.fm killer idea we all envisioned when we heard about it of bringing a music social network to the actual music player people use, is just a webpage poorly stamped to my music player, with absolutely no integration with my library.

Even Last.fm, a 3rd party social network has more integration with my library then a social network inside my music player. If this makes sense...

P.S.: what I said about Posting is equally applicable for Liking a song. You can't do that in your library and there is also no relation between your 5-star rated songs and the music you actually like according to ping.

miguelpais··on Apple to Provide Live Video Streaming of September 1 Event
Amazing, they completely turn that first paragraph into a huge oxymoron.

Let's see, we have this beautiful HTTP Live Streaming technology based on open standards but somehow it can only be appreciated on a Mac or iPhone...

This must be one of those standards hated by everyone else...

miguelpais··on Satoshi Kon's last words
Oh, the director of Paprika, I saw that anime. It's complex but visually stunning.

I would be proud of having accomplished something like that...

Trailer: http://www.youtube.com/watch?v=jJzEW_eE1G0

miguelpais··on Wired youth forget how to write in China and Japan
In here you have a very interesting video about Kanji I saw some months ago:

http://www.youtube.com/watch?v=2WxihOeMPBg#t=4m10

(I put the flag to skip to the moment he speaks about this issue).

miguelpais··on Wired youth forget how to write in China and Japan
How can it be the end of, for instance, Kanji if the whole language relies on it?

You probably know that when a Kanji character is written in hiragana or katakana, you have no clue of the true meaning, it can be many different things. So how can it end without disrupting the whole language?

miguelpais··on The Most Important Algorithms
A* is not just that. The way it is said seems to imply that it is equal to Best First Search. Best First Search only relies on the heuristic function, so for the following graph, where A is the start node and h is the heuristic function:

+---A---+

|...........|

B h:1....E h:4

|

C h:2

|

D h:3

The traversal order according to Best First Search would be:

{A, B, C, D, E}

While A* will search by g(x) = h(x) plus d(x), the latter being the distance function from the start note to the given node. So, assuming the distance function to be equal to the depth of the node in the tree it would traverse it this way:

{A, B, C, E, D}

g(D) = h(D) + d(D) = 3 + 3 while g(E) = h(E) + d(E) = 4 + 1 = 5, so E goes first.

miguelpais··on [dead]
Wow, an article raising a topic that the author finds interesting, relating it to something which it has nothing to do with, trying to correlate the two but ending up dismissing the correlation.

Most interesting thing in the article, there is a parasite which reproduces in cat's stomach, and to be able to get there changes the behavior of mice to be less careful of cats.

Everything else is bullshit.

miguelpais··on "Study Functional Programming or Be Ignorant"
Is he also calling ignorant to the OO Scheme or Lisp programmers?

The best approach appears to me to be taking the best of both worlds. Functional may solve lots of problems, but you can't deny the advantages of a good OO design. Just devise your OO architecture for good reusability, flexibility, low coupling and high cohesion and then just use the best that functional programming has to offer.

miguelpais··on The man who took 40,000 ecstasy pills in 9 years
Really, an average of 12 pills a day?

Wouldn't that make you continuously high?

miguelpais··on Soccer and the law of large numbers
I think Mourinho will finally give that club the stability it needs either by bringing new players, not particularly the big stars, but those who are able to play in the context of a team, or he will just take the big stars out of their pedestal and make them work if they really want a place in the team.
miguelpais··on Soccer and the law of large numbers
Probably making the goalkeeper unable to save with his hands. To avoid injuries for the goalkeepers you could then reduce the height of the goal to something like 0.7 meters, so that saves would be done with the legs and knees. Then you could bring back the old heavy balls.

And then it wouldn't be Football anymore...

miguelpais··on Soccer and the law of large numbers
Football (sorry, Soccer) is not the kind of sport which enables high scores, it never was. Actually, in the past, goals seemed to occur more often, but that was mostly because of the huge discrepancies between the opposing teams.

I think it would be much more easier to embrace what Rugby does, and get a referee analyzing TV footage to help the field referees when doubts arise, than changing the one thing that makes soccer what it is, the act of scoring a goal and what it represents, reducing it to nothing, turning Soccer into one of those sports where in each attack there is a point taken for the attacking team, being the game decided by those few attacks that weren't successful.

miguelpais··on 3D Video Hazardous to Your Health
I just hope that ten years from now 3D televisions won't have become the standard to the point of buying a regular HDTV being impossible.

I mean, 3D is nice for a change but I just feel like it was the new way for companies to create another high priced product to make people want to replace their already expensive and recently bought TVs without that much value being added to the product.

miguelpais··on Need best Javascript books suggestion
The book is very concise and probably one of the books with higher ratio of relevant content per page. It also teaches you the grammar of JavaScript in one of the most simple and unambiguous ways I ever seen in a book (railroad diagrams).

On the other hand it was one of the shortest book I ever read in which I had to reread and go back more times. JavaScript can be a bit confusing at times and the book only says things once and in a succinct way.

Everything was going fine until Prototypes and Constructors and the very bad 'new' operator, that somewhat surprisingly was used in the good function which achieved Prototype Inheritance (example in here: http://javascript.crockford.com/prototypal.html), but after a while I got it. ;)

It's the only book I've read about JavaScript yet. I consider it very good if you already are proficient in other programming languages, but it doesn't really show you what to do with it (and it wasn't supposed to), so I'm now planing to buy JavaScript the Definitive Guide.

miguelpais··on [dead]
The thing is, there are tons of different and case specific physical disabilities. What works for some of them, doesn't work for the others.

But anyway that's no excuse, they could create some accessibility mode based on an keyboard shortcuts for the iPad for instance. Most of the games wouldn't work though, and the web experience wouldn't be that great, but it would be a start.

miguelpais··on The Ultimate Guide To A/B Testing
I just get the impression that someone who wants to do A/B testing after reading this article will just create a different version of the website, and probably analyze the average of the results in each version and end up deciding solely on that.

Hope they don't miss the second point of the do's, it should be more emphasized:

> Don’t conclude too early. There is a concept called “statistical confidence” that determines whether your test results are significant (that is, whether you should take the results seriously). It prevents you from reading too much into the results if you have only a few conversions or visitors for each variation. Most A/B testing tools report statistical confidence, but if you are testing manually, consider accounting for it with an online calculator.

By the way, Excel can do it.

miguelpais··on Medvedev (Russia President) now in Twitter
To get the Verified Account badge?
miguelpais··on My Four-Year-Old Son Plays Grand Theft Auto
> Here in the UK there are actually quite good limits on that. I'm not sure you would, say, ever see Starsky and Hutch (the film) on at 4pm.

I'm from Portugal and here is quite usual to see some Mission Impossible, van Dame or Schwarzenegger movie on at 4pm. Actually, most of the movies aired at Saturday and Sunday afternoons are something like PG-13.

Since here there are only 4 broadcast conventional channels, and many people don't have cable, it is quite easy for kids to be exposed to such movies.

miguelpais··on My Four-Year-Old Son Plays Grand Theft Auto
Much is said about protecting children from video games, but what about other mediums (mainly TV, given its exposure)?

Any station can air some movie at 4pm featuring the good cops shooting the bad guys. Or, for instance, it is easy to be watching some news report at dinner and being exposed to something beating the horror or gore movies by points.

Aren't kids exposed since birth to the notion that violence becomes acceptable if against the bad guys? Where goes the moral of don't to others what you don't want to be done to you?

Even some very successful animated movies like Lion King end up with the bad guy being killed. Either intentionally or not, kids end up satisfied that the bad guy had what he deserved and that all become happily ever after.

I'm not for one side or the other, I just wanted to raise some questions to see what you guys think. I don't think video games are bad for children, but I agree they have to be picked appropriately for their age. But I also think we end up avoiding violence in the obvious places but letting kids completely exposed to it in another ones.

miguelpais··on Anyone interested in starting an HN blog network?
You would need a large group of different skilled people to be able to do it successfully in a way that good points about the stories arise in the show, given the broad range of different kinds of topics that get submitted to HN.

But for that you already have the comments on HN, so it would have to add something more.

Maybe teaching something, or adding new comments from people that did not comment the story but are able to make some good points...

It would be nice if well thought...

miguelpais··on That Sounds Smart
The good point I think the article makes before generalizing about smart people's qualities is the fact that in many cases, such as argument, there are people who will toss some concepts, jargon or ideas without fully understanding them and because of that can look to an outsider (maybe your boss) like they won the argument.

Of course, if the other person in the conversation is really into that concept, jargon or idea he can quickly point out its flaws. But what is most likely to happen is for the other guy to have to make some effort to remember what that concept was and having to put the pieces together. When he can actually identify what was wrong in the argument, the battle will be long gone and lost.

Meanwhile the other guy may have made his opinion prevail and gain something because of it.

miguelpais··on Why Arc90 Built Readability
Neither did I. So I find it strange that in news articles like this one: http://travel.nytimes.com/2010/06/13/travel/13Harry.html?hp Readability still does a better job then the Reader extension that is based on it.

Readability is able to include the images and presents something that doesn't look like a poorly printed page like, sorry guys, the Reader thing does.

miguelpais··on Apple faking 489 to 815 PPI on iPhone 4 ads
It was not the high-quality of the "a" on the right that was exaggerated, it was the low quality of the one on the left.

The "a" on the right is fine, it is there to represent the kind of image in which you no longer are able to detect pixillation, going above of the supposed 300dpi limit, like what would happen on the iPhone4. On the other hand, presenting on the left an "a" with half the quality of the one on the right would probably be too difficult for people to spot the difference.

If they were fair on that slide, it probably would be interesting to analyze if people would really notice the difference or if they would just pretend they did (http://en.wikipedia.org/wiki/The_Emperors_New_Clothes). Sure thing, it would not have that much of an impact, at least until all of those people get the chance of having the new iPhone in their hands.

miguelpais··on Could an atomic bomb stop the Gulf Oil Leak?
Do not call the Russians then: http://en.wikipedia.org/wiki/Tsar_Bomba
miguelpais··on Could an atomic bomb stop the Gulf Oil Leak?
Wouldn't that cause a tsunami?
miguelpais··on Interviewing programmers: coding test results.
To be honest, I didn't believe in the FizzBuzz situation when I read it. I didn't believe that it was possible to exist such a group of programmers who couldn't do a simple code like that.

Assuming such a group doesn't exist, I'm all for harder problems, harder than the one presented.

But assuming the group exists, and assuming, as I did, that the problem presented tries to weed out its members, I just though something that "hard" wasn't needed.

But of course, the point of an interview is to identify the good, not the bad, so harder problems would do just fine as well in ruling out the bad.

But the whole point of the article was a user's doubt in being able to pass a FizzBuzz kind of problem. For that, something harder than the problem presented may probably not be embarrassing at all to fail at.

miguelpais··on Interviewing programmers: coding test results.
Exactly. The comment I replied to was asking for something less trivial, while this is probably all you have to do to identify the candidates who can't code.

The FizzBuzz problem is at least one order of magnitude easier than this, and still is able to rule out a great part of the candidates (by time limits, according to CodingHorror, not exactly by not being able to code it). The good thing with this test is that you can actually get a glimpse of the ability of the candidate to come up with an efficient solution and identify its complexity.

← PreviousPage 2 of 4Next →