HNHacker News
TopNewBestAskShowJobs

miguelpais

170 karma · joined February 10, 2009

submissionscomments
miguelpais··on Uber is charging drivers to work
Is Uber trying to be another real world enactment of Animal Farm?

The resemblance doesn't seem to be a coincidence.

miguelpais··on How north ended up on top of the map
Well, the portuguese navigators did have a lot of trouble crossing it. This was due to the fact that they mostly always sailed with the coast in sight, but when they reached the equator, there was just no winds or currents to keep pushing them, so they would just get stuck.

It took them a couple of years to find a way out of that point, by making huge turns westwards into the atlantic (which eventually led them to end up in Brazil, but that's another story...)

miguelpais··on How north ended up on top of the map
But remember also that northern hemisphere navigators like the Portuguese also had to align their maps in a different direction as they crossed the equator and lost their main reference star on their way around Africa.

They soon discovered how to navigate by then aligning with a group of stars called "Cruzeiro do Sul", the Crux constellation[1], which means that it could be reasonable to actually start aligning the maps southwards (and the portuguese were the ones mapping the whole coast of Africa at the time).

But I guess that by that time (around the 1470s), they were already too used to aligning northwards...

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

Edit: I meant northern hemisphere navigators, instead of northern european.

miguelpais··on Live map of London Underground Trains
>> "Live departure data is fetched from the TfL API, and then it does a bit of maths and magic"

Even though this actual service is probably not so accurate, it does give an interesting view on what the transportation information services can become in the future!

The transportation companies probably do already have the data anyway...

miguelpais··on The Exodus of Tech from Portugal
To be quite frank I wonder what is better for the country: staying there, working your ass off and getting just enough to survive, or being outside, opening your horizons, maybe being exposed to new ways of thinking, technologies or ideas, and one day come back and strive to offer to the country what you learned outside.

These people that are leaving, they still love they country, and I'm sure most of them still think about returning to it sooner or later.

miguelpais··on The Exodus of Tech from Portugal
I'm one of those about to graduate students from a technical university in Lisbon, and for me, there is no doubt anymore, I'll start to work outside of Portugal.

When you look at it from one side, South European countries have everything: they have the food, the weather, good universities, kind and welcoming people (not to say that other countries don't), talent. They have the potential to be the best countries to live at. What's missing then? For me what is missing in Portugal, and what makes me want to go away from it is mostly bad working conditions: the notion that the IT guy is the new slave. I have had older colleagues saying to me that they were working on a Sunday at 11pm and have seen people from consulting companies coming to my university and proudly saying that when we would be working at their company "we could say goodbye to that cinema evening with friends". These consulting companies, some of which are always eager to hire (which leaves us wondering what is happening to their workforce), exploit the fact that these graduates are used to semesters of constant crunch time and exploit them by putting them in the same state in their companies. People are expected to work past their time, and most of them do... and for what? 1200 euros before taxes and you are considered lucky. If you don't accept that paycheck someone else will.

I did in my last college year an Erasmus in Sweden that came now to an end, and I'm not coming back to Portugal. I've found things to be very different here. There is a huge respect for life outside work, and the jobs actually pay the graduates with the salaries that reward them for their effort and knowledge.

The problem is maybe precisely this one: graduates feeling that there is no reward waiting for them by the end of college.

miguelpais··on Show HN: roll.io eats txt files and shits youtube videos. Useful?
Once I thought of something like that too, but in the environment of a park with speakers and wifi (yeah, far fetched, I know). People could go to a website available on the wireless network with their smartphones and pick a track to play (from a library such as Spotify). Then everybody on the park would be able to up or down the track using their smartphones. If the track had enough up votes, that person would be able to pick another track to play.

It would be the interactive/social/sound park. :P

But since I don't know that many parks with speakers, on clubs it would probably work better. They could do it as an experiment on a tent of some festival like they did with the concept of the silent disco (http://en.wikipedia.org/wiki/Silent_disco).

miguelpais··on Show HN: roll.io eats txt files and shits youtube videos. Useful?
WOW! I had exactly this idea at a Hackaton festival called Codebits in Portugal in November last year and presented it[1] to the audience but didn't receive that much excitement from them about my implementation done in 12 hours using JS and Rails3.

Now I see I should have stick to it. Deep inside me I knew if the service would be useful to me, it would be to some other folks, but I was a bit disappointed and didn't correct the bugs that the project had.

Here is the website if you guys want to check:

[1] http://youtubemyplaylist.heroku.com/

It is buggy, sometimes doesn't change to the next video and it lacks the controls and the display of the playlist as this site does and it is a lot slower. It also lacks the upload of a text file. But I had other ideas in mind, the mode implemented was supposed to be the "feeling lucky" mode, where you just typed each video one per line and hoped it would match to the video you wanted, but you'd also have a way to create playlist more carefully by passing the exact urls of the videos you wanted, like this site does.

How do you overcome this feeling when you know you should have sticked to your guts?

Anyway, good work guys! This is exactly what I wanted.

miguelpais··on A brief Sony password analysis
If the salt is the same for all the users you can have it on the source code that hashes the passwords. Not always being SQL injected means having the back-end code leaked.
miguelpais··on A brief Sony password analysis
>> "And if the passwords were salted before the hash is applied? Well, more than a third of the passwords were easily found in a common dictionary so it’s just a matter of having the compute power to brute force them and repeat the salt plus hash process."

Well, assuming that you know the hash, because if you don't, things don't get that easy. I'm assuming systems that salt passwords don't store the salt in a row of their database, but with security, or the lack of it, everything seems to be possible.

miguelpais··on Facebook hype will fade
That's why I have friends lists. Just some weeks ago some girl I didn't know that happened to be the designated driver of the group of friends I was with on the new years eve sent me a friend request on facebook.

I don't want to be rude and accepted it, but she went to my list of people that I don't consider friends, but people that at some point in my life I had some interaction that as now ceased. That list doesn't have access to my photos, only some personal information and the majority of my status updates are invisible to them unless I explicitly set otherwise.

So yeah, they're my fake friends. If your friends list is already big setting this up and checking if there are no backdoors into your information will be painful, but I think it pays off. I did it mostly because I didn't want to bring the family and friends sides of my life together in a single website, with all the potential problems that could come from that, but I ended up creating more than just the friends and family lists.

Funny thing, right now Facebook privacy is more about protecting your information from your "friends" than from the outside world.

miguelpais··on The progress bar illusion
The biggest illusion of progress bars is when they don't accurately represent the time left for something to complete. Like when you wait 7,5 minutes for the bar to reach 75% and then it suddenly jumps to 100%, instead of taking another 2,5 minutes to complete (that is frequent on installation processes).

Of course, when it comes to download progress bars it's not possible to make it accurate without making it bigger as the download speed drops and making it infinite/disable it when the speed is 0KB/s. But in other offline tasks the progress bar is frequently useless to capture time remaining for the completion of something.

That's probably why a time remaining label is added to them.

miguelpais··on NLP Challenge: Find semantically related terms over a large vocabulary (1M)?
That's somewhat similar to my second mini-project of my NLP course (that I just delivered like one week ago).

What we had to do was, first to gather a large corpus (in this case) of portuguese. Then, produce the frequencies of each unigram and bigram. Then, process those frequencies and output the top 10 and bottom 10 collocations of the corpus. Collocation definition from wikipedia: "Within the area of corpus linguistics, collocation defines a sequence of words or terms that co-occur more often than would be expected by chance".

The method used to calculate the collocations was based on a chi-square test. The values with higher chi-square were the most probable collocations (if above the critical value that would reject the null hypothesis).

So, I actually have Ruby code done that I could change just a little bit for this, but there are probably more clever methods.

miguelpais··on Google UX Researcher Explains the Social Networking Gay Bar Problem
Debbie's problem is exactly what makes me use the Friend Lists feature of Facebook. It might not protect your data that well, but at least it is able to keep things semi-private from the (less tech-savvy) friends of yours from other social circles.

But, of course, Facebook screws you in the end. Even you choose exactly what friends see that photo of yours, and what friends see that wall post, you happen to comment on a friend's photo and then everybody sees it.

And it also does nothing about friends of yours from some circle deliberately accessing the profiles of the people from other circle and seeing everything you didn't want them to see (like tagged photos of yours that they couldn't see on your profile because you forbidden them to).

miguelpais··on If Richard Feynman applied for a job at Microsoft (2002)
It might not be that clever, but it is able to considerably reduce the running time of the algorithm (even if the speedup in a 9x9 puzzle is not perceived).

In fact, if you ask people not from a CS background to explain the steps they would take to solve a puzzle, they probably wouldn't be able to think of a DFS, but they would state that they should rule out from each cell the numbers already present in its respective column, line and block. And for a Sudoku solver I don't think you really need more constraint propagation than that.

Anyway, I think you approached the problem the right away, I just think that you were so close to succeed in that test and it wasn't something that difficult to add to your solution.

EDIT: wrote the above before your edit. It's still appropriate though.

miguelpais··on If Richard Feynman applied for a job at Microsoft (2002)
As far as I know Norvig's solver has constraint propagation (maybe it didn't have it in the first version though).
miguelpais··on A Short, Simple Introduction to Information Theory
Halfway through the article this encoding / data compression algorithm I learned last semester came to my mind:

Huffman coding http://en.wikipedia.org/wiki/Huffman_coding

It was really simple, based on a file with a given number of symbols, it would rewrite those symbols as length-variable unique binary codes, so that the symbol with highest number of occurrences would become the code with the smallest possible bit-length, and so on with the other symbols so that it would spend most bits on the symbols that occurred less times.

miguelpais··on 1,000 (bad) ideas
Yeah, but I can't think of two similar actions where it would be difficult to define the expected behavior: sometimes you just take one bud out momentarily to be able to listen to something external and you don't really want the music to stop. The other one is common in teens, when they share one bud with a friend to listen to some track together and the music should be stopped while that bud is not put.
miguelpais··on Google: What We're Driving At
Of course, but as the statement was said it was if there was no way of commuting without oneself being the driver.
miguelpais··on Google: What We're Driving At
"In terms of time efficiency, the U.S. Department of Transportation estimates that people spend on average 52 minutes each working day commuting. Imagine being able to spend that time more productively."

You can, it's called taking the bus, and in the process it actually employs some people such as drivers, cleaning personnel, etc.

miguelpais··on Chinese Govt. Blacks Out News of Dissident Liu Winning The Nobel Peace Prize
"Attempts to send mobile text messages with the Chinese characters for Liu Xiaobo failed."

Not only the internet, but also the text messaging channels are under censorship. China looks like a country that came out of a political horror movie.

miguelpais··on First improvement of fundamental algorithm in 10 years
As far as the article goes, this new solution could very well be just a different version of the Simplex method, which can also solve this kind of problem.

As some already said: better article needed.

miguelpais··on Did Little Bobby Tables migrate to Sweden?
I didn't get it. I'm assuming the majority of the people voted electronically. So, are these votes the traditional ones? If so, why do they allow a text area on it? Is the person supposed tho write the name of the candidate instead of selecting it from the options available?
miguelpais··on A tale of two cultures
> I always wondered why Kevin and Alex felt the need to hide behind their laptops on Diggnation.

What do you mean by that? The stories are online and I'm sure the show wouldn't be any better if they memorized them.

miguelpais··on [dead]
So, are we talking about Tektonik?

http://www.youtube.com/watch?v=VqRR10Xy3GU#t=0m15s

Damn, I thought this was way cooler:

http://www.youtube.com/watch?v=KOzQJWPzWmE

miguelpais··on The A* algorithm in Clojure
As this snippet doesn't really help a lot to know what A* search actually is, here is the explanation from Artificial Intelligence: A Modern Approach (from Russel and Norvig):

The most widely-known form of best-first search is called A-start search (pronounced "A-star search"). It evaluates nodes by combining g(n) - the cost to reach the node, and h(n) - the cost to get from the node to the goal:

  f(n) = g(n) + h(n)
Since g(n) gives the path cost from the start node to node n, and h(n) is the estimated cost of the cheapest path from n to the goal, we have

  f(n) = estimated cost of the cheapest solution through n*
Thus, if we are trying to find the cheapest solution, a reasonable thing to try first is the node with the lowest value of g(n) + h(n). It turns out that this strategy is more than just reasonable: provided that the heuristic function h(n) satisfies certain conditions, K search is both complete and optimal.

So, for the following graph (tree actually):

  +---A---+
  |       |
  B h:1   E h:4
  |
  C h:2
  |
  D h:3
Where the function g(x) is the depth of the node in the tree, and the heuristic function h(x) is presented next to the node (random values), A-star will search for a solution first in the nodes with smaller values of f(n). So a traversal starting at node A will visit nodes in the following order: {A, B, C, E, D}

  f(B) = h(B) + g(B) = 1 + 1 = 2
  f(C) = 2 + 2 = 4
  f(E) = 4 + 1 = 5
  f(D) = 3 + 3 = 6
If there's anything wrong with my explanation please correct me.

P.S.: I know my heuristic function is probably not admissible.

miguelpais··on Every BBC Essential Mix, 1993 to 2010
Awesome! I usually download three or four of these a year from the DJs I like.

And Yes! I'm glad this came to HN, otherwise I wouldn't find it and I love the Essential Mixes.

From 2010 I recommend the one from John 00 Fleming at 13-FEB-2010.

miguelpais··on I'm not sure you've really got this whole Object-Oriented thing down quite right
Well, of course, and I ended up doing that. But that's not the point, is it? The guy in the blog post could also abstract all those lines in some method and it wouldn't make that OO design with factories and contexts any less bloated.
miguelpais··on I'm not sure you've really got this whole Object-Oriented thing down quite right
Did the library design get any less bloated that way?

I don't think the last line would work...

miguelpais··on I'm not sure you've really got this whole Object-Oriented thing down quite right
Instead of code inspection, maybe the manager should impose short and easy to validate requirements (sub requirements of the general requirements imposed by the client) and ask the programmer to show the software passing them.

Even if TDD is not being used, the programmer can write a simple test for it and then show the manager the test succeed.

This semester I had a class of Software Engineering when we did a project using Scrum and weekly we had to show our teacher that we had accomplished our tasks. The teacher was playing the role of someone who didn't know any code, but we still had to show stuff working. So we would write simple tests to show for instance that SOAP Messages were being sent by one entity and in fact received by the other.

Page 1 of 4Next →