HNHacker News
TopNewBestAskShowJobs

wallunit

386 karma · joined September 15, 2010

Email: sebastian.noack (at) gmail.com
submissionscomments
wallunit··on Google paid AdBlock Plus to get its ads whitelisted
This comparison implies that everybody can get their ads on that white list, for money. But that isn't true. There are guidelines that define what is acceptable ad and what not. [1] Everybody that gets on the white list has to conform to that guidelines.

So it would be rather like an AV software that lets by default, installers still change your default home page (or stuff like that), if the installer is fair enough to ask for, but would still block any real malware.

[1] http://adblockplus.org/en/acceptable-ads

wallunit··on Google paid AdBlock Plus to get its ads whitelisted
I just noted that Adblock Edge is still based on version 2.0.4 of Adblock Plus, which is outdated for a while. It seems that Adblock Edge isn't maintained anymore and probably never was.

So Adblock Edge will probably get incompatible with future versions of Firefox, anyway. And if there are security issues in the code, it is rather unlikely that they will get fixed, as fast as in upstream Adblock Plus, if at all.

On the other hand I think it is way less likely that Adblock Plus will add a lot of features that wouldn't be in your interest, in the near future.

Sure it is a change in the ethical background of the product. Adblock Plus isn't a hobby project anymore. It's a business now. That means that it has to be profitable. But on the other hand that also means that there are more resources available. So the product can be properly maintained, further improved, and ported to new platforms.

I think this "ethical failing" (as you call it), isn't more or less serious, or unexpected, than when Google introduced in-app ads in Android. In the case of Adblock Plus, as well in the case of Android, I'm happy that the company behind the product found a way to make the product profitable. So they can maintain and improve the product.

wallunit··on Google paid AdBlock Plus to get its ads whitelisted
I don't think that you have any reason to feel disappointed, unless you have donated a significant amount of money to Adblock Plus. And even then, just disable that feature.

After all that's the way Adblock Plus makes most of its money, needed to develop the browser extension, port it to new platforms, maintaining and hosting the filter lists (which by the way are also used by every other ad blocker). I doubt that if Adblock Plus wouldn't have done this step, it would have ever been ported to other browsers and platforms, and that the filter lists (as mentioned, also used by other ad blockers, like AdBlock), would have been that well curated as of today.

So I don't see anything wrong with that. Or does anybody complain, that most free Android apps show adds, and you have to buy the paid version, to get rid of them? No, everybody understands that this is the way they make money. The only difference in case of Adblock Plus is, that you don't actually have to give them money, but just have to disable a checkbox in the options.

wallunit··on Google paid AdBlock Plus to get its ads whitelisted
1. There was a user survey in 2009, whether users would like to have every ad blocked or would accept some ads to a certain degree. And the result was that around half of the users are fine with getting some ads: http://adblockplus.org/blog/adblock-plus-user-survey-results...

2. Adblock Plus has announced on their website that they have introduced "Acceptable Ads", and that it will be enabled by default: http://adblockplus.org/en/acceptable-ads

3. It isn't even a secret that they get paid from larger companies, for putting them on the whitelist (they though have to conform to the guidelines for "Acceptable Ads"): http://adblockplus.org/en/acceptable-ads-agreements

4. Plus the source code is open source, that everybody can read it: https://hg.adblockplus.org/adblockplus/

So Adblock Plus couldn't possibly be more honest and fair about its "Acceptable Ads" feature. If you don't like it, it's just 3 clicks to disable it. I don't get why lately, everybody is so surprised about thatfeature and feels betrayed.

The German media went completely insane over the past two weeks, and made a scandal out of that feature in Adblock Plus, which exists for quite a while now and was clearly announced and documented from the beginning by the AdBlock Plus Team, and can easily be disabled.

wallunit··on Google paid AdBlock Plus to get its ads whitelisted
Why does somebody fork ABP, just to strip out a featere which can already be disabled in the options?
wallunit··on Porting to Python 3 Redux
Except for the module creation you can easily add some very simple compatibility macros. I don't see how that would be different from your _compat module. However module creation can't be abstracted into a uniform macro in fact, because of it requires to define a PyModuleDef struct and the the modlue's init function got a return value in Python 3. But I'm fine with using some #if PY_MAJOR_VERSION >= 3 here.

After all you have to deal with way less compatibility issues, in extension modules than in actual python code. And if needed you can always do a simple version switch. You don't have to care about changes in the syntax of Python. You also don't have to care about changes of the __*__ magic method, because of you don't call them directly, and when defining classes you use slots for stuff like that.

wallunit··on Porting to Python 3 Redux
> If you have a C module written on top of the Python C API: shoot yourself. There is no tooling available for that yet from what I know and so much stuff changed.

I don't agree with that one. I have added Python 3 support two years ago to the Python bindings for libssh2 and it was straight forward. First of all it is still C and therefore you don't have to care about the syntax changed in Python. Just add some #if PY_MAJOR_VERSION < 3 for API calls that have changed, or even better wrap that code in macros. Probably you already have some backwards compatibility switches/macros like that already anyway in your code, if you already support multiple versions of 2.x. So adding some more for Python 3, isn't that a big deal.

At least at that time, when six and modernizer wasn't available it was way easier and straight forward to support Python 2 and 3 with the same codebase with extension modules, than with actual Python code. And it seems if you don't want to drop support for Python <= 2.5 or <= 3.2, it still is.

wallunit··on Bing doesn't support SSL
Its so impressing how Bing manages to deliver search results as well curated as those from Google. But wait, I just remembered that is because of they rely on search results from Google. ;P

http://googleblog.blogspot.de/2011/02/microsofts-bing-uses-g...

wallunit··on How to work with Software Engineers
I was surprised how many thing the management of the company I'm currently working for is doing right, until I reached the afterword. ;)
wallunit··on Ask HN: What should I know before working remote for a company based in the US?
That's all I need? No H1B or other form of visa?
wallunit··on Ask HN: What should I know before working remote for a company based in the US?
The most interesting jobs I've found here on Hacker News. Every month there is a "Who is hiring?" thread.

http://news.ycombinator.com/item?id=5304169

wallunit··on We Should Expect To Pay For Small Open Source Projects
I released several "Type 0" free and open source software in the past. And making people pay for using them, would be the worst I could have done. The software I release as FOSS, is basically stuff I would have coded anyway. But by releasing it for free and as open source, i got following in return:

* Feedback with ideas I wouldn't have come up with myself, that helped me to improve my software.

* Free testers, that reported bugs, I wouldn't have found myself.

* Free contributors, that sent me patches for features and bug fixes I would had to spend my own time on otherwise.

* A nice portfolio, future employers can look at, making it more likely that they hire me.

However making people pay for using my software, will reduce the number of people using my software, and so the number of people who will give feedback, report bugs, and contribute patches. Also people paying for something are less likely to contribute. They are more likely to expect that it is my job to make sure that the software behaves like they expect, since they are paying me for it. But 10-15$ per user, is much less money as I would save by releasing it for free, increasing the number of users/testers and their motivation to contribute.

wallunit··on Show HN: Cocktail search written in Python using scrapy and sphinx
http://sphinxsearch.com/docs/2.0.6/
wallunit··on Show HN: Cocktail search written in Python using scrapy and sphinx
I'm not sure if either approach would improve the results.

Searching the introductions in additions to the list of ingredients, will rank recipes higher, when the ingredients you were searching for, occur more often in the instructions. But a recipe isn't necessarily more relevant, because of its instructions are more verbose.

I'm not sure if an AND function would add much benefit. Yes, at the moment only one of the given ingredients must be part of the cocktail, in order that it appears in the search result. But the search results are also sorted by relevance, so that cocktails that contain more of the searched ingredients are ranked higher, than cocktails that contain fewer of the searched ingredients.

I'm pretty sure that there is no way to PM other users, here at Hacker News and you don't have an email address in your profile. However if you want have a further discussion on that, feel free to write me an email. You'll find my email address in my Hacker News and Github profile.

wallunit··on Show HN: Cocktail search written in Python using scrapy and sphinx
For example, if you enter the ingredients "rye whiskey" and "vermouth", following query is generated:

@ingredients (rye SENTENCE whiskey) | vermouth

The SENTENCE operator, basically works like the & operator, just that both operands must occur in the same sentence. That is very helpful, since the index field "ingredients" contains a list of all ingredients of the recipe separated by an "!".

However Sphinx can not only do full text search. You can also filter and sort by attributes and complex expressions, that involve any attribute, the relevance from the fulll-text search, arithmetics and some built-in functions. And Sphinx does that much faster than any RDBMS does. I never managed to generate a sphinx query that took a measurable amount of time, on my 3 years old notebook. ;)

The sphinx index doesn't contain any HTML. However I return HTML, from the WSGI app, that serves the AJAX calls. So I guess that is what you are talking about. It just seemed to me, it would be simpler to generate the HTML for the search results on the server-side with Python than in Javascript.

By the way if you want to use Sphinx for your own project, and you have the data to index already in a MySQL or PostgreSQL database, there is no need to write a script to generate XML. Sphinx can index data from MySQL and PostgreSQL databases directly. However I was just saying that, thanks to xmlpipe support, you don't need an RDBMS just to use Sphinx. And that thanks to index attributes, Sphinx can completely replace an RDBMS in a lot of cases.

wallunit··on Show HN: Cocktail search written in Python using scrapy and sphinx
Yes, I use "scrapy crawl <spider> -o <spider>.json" (see bootstrap.sh). Sphinx can not index JSON files directly, but it can index an XML stream written to stdout by a given command. So I have written a script (sphinx/xmlpipe.py), that reads the JSON files generated by scrapy and writes the crawled recipes in sphinx's XML format to stdout.

There are alternatives to Sphinx? ;)

* Sphinx is ridiculous fast, as you can see when searching. But even building the index takes only 340ms (from which 220ms are spend by the python script that generates the XML) for 1699 recipes on my 3 years old notebook.

* Sphinx don't require a RDBMS to index documents from. It can index documents from any source. You just need to write a simple script that brings the documents in the XML format expected by sphinx.

* Sphinx is not only a full text search engine. It is also a multi-value store. You can add extra information like the title and url to indexed documents. And so you don't need an additional database.

* I need the ability to limit a fulltext search to sentence boundaries. I don't know if there are other fulltext search engines that can do that.

wallunit··on Show HN: Cocktail search written in Python using scrapy and sphinx
They reset the timout everytime you type another letter. That approach seems to work quite well, unless you are a very slow typer.

However I have just implemented another approach to deal with that issue. Now, the history is updated either when the current field lost focus or when you move the mouse, after you entered something. Please try it out and let me know what you think.

wallunit··on Show HN: Cocktail search written in Python using scrapy and sphinx
Actually the english stemmer from libstemmer/snowball is already used. Additionally there is a wordforms list, that at the moment maps only whisky to whiskey. ;) Feel free to do a pull request, if you know other words that must be normalized. I have also just added an advanced charset_table, mapping amongst others "é" to "e". So when you search now for "créme", you get the same recipes as for "creme".

At the moment I only crawl Wikipedia, liquor.com and seriouseats.com for cocktail recipes. But thanks for mentioning Esquire. I didn't knew that website yet. Maybe I will crawl them as well in the future.

One direction mapping of words is unfortunately not possible with sphinx. However I could expand "brandy" to "brandy OR cognac OR calvados", just before I run the query. I will consider that approach.

wallunit··on Show HN: Cocktail search written in Python using scrapy and sphinx
Actually the entire backend is on github. But let me explain it for you.

There is as you have already discovered, a crawler implemented with scrapy. However I don't use the scrapy server and pipelines. Instead I have a script that lets scrapy generate JSON files with the crawled recipes and builds the sphinx index from the crawled data. There is no RDBMS. Basically sphinx is my database. :)

Well and than there is the website. Its server-side is implemented with werkzeug and its UI with jQuery.

wallunit··on Show HN: Cocktail search written in Python using scrapy and sphinx
The primary reason why I am using the history API, is that you can bookmark and send links to a specific search. However I agree that when you are actually using the history, it becomes annoying to have any search that was executed while you were typing in your history.

However when updating the history only every 10s, you might have to wait until you can copy the link to your search from the address bar. And if you aren't typing fast enough there still can be incomplete searches in your history.

Using onblur would be better. But what would you think about, updating the history as soon, as the cursor is moved? I think I like that idea pretty much.

wallunit··on Show HN: Cocktail search written in Python using scrapy and sphinx
Thank you very much for the feedback. However the problem is, that the ingredients as imported from the websites I crawl aren't in any structured format. I didn't found a reliable way to extract the amount and the actual name of each ingredient. And without that, auto-completion and converting amounts is impossible to do. However if somebody is smarter than me, suggestions (and pull requests) are welcome. :)
wallunit··on Realtime Web Messaging over Animated Gifs
Only if your server code process each request in a separate thread. But that's also true, when using web-sockets or when using the GIF approach. When implementing real-time applications, you always have to write non-blocking asynchronous server code, for example using node.js or Twisted.
wallunit··on Favicons in the retina age
Using SVG for favicons would be a much better approach. Otherwise we would just end up in a few years, where we are now. But SVGs are scalable and look as good when rendered as 16x16, as 64x64 as 1024x1024. Of course that won't work for photos and stuff, but you can pretty easily turn most favicons into a scalable vector graphic.
wallunit··on Realtime Web Messaging over Animated Gifs
Chat rooms 10 years ago weren't using web standards like HTML, GIF and Javascript. They were writing either in Java or in Flash.

However MSIE6 also supports XmlHttpRequest (though an Active-X Control), which you can also use for real-time communication. Just setup a XmlHttpRequest and let the request idle on the server-side until new data become available.

wallunit··on Ask HN: Does anybody wants to show me what is going on in San Francisco?
Where are you right now? Lets meet. Just write me an email it is in my profile, now.
wallunit··on Waking up at 5am to code
Why is waking up two hours earlier in order to do stuff like coding on personal projects so much better than staying up for two more hours at night?

It won't make the day longer. Each hour you wake up earlier you will also probably go to sleep earlier. Of course you could also sleep less, but also in that case IMHO it doesn't make a large difference whether you add those extra hours to your night or to your morning.

Some might argue, that morning hours are more productive. But for me that is only true if I have slept well and long enough and it also implies that whatever you do in the evening will suffer by starting your day earlier.

wallunit··on From zero to Go: launching on the Google homepage in 24 hours
The pirate easter egg [1] seems not to work [2].

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

[2] http://google-turkey.appspot.com/thumb/295552a0

wallunit··on Cross-side scripting vulnerability in gitweb
There is basically no login area. Gitweb is the official web interface for the source tracker git. If you have permissions to push to the repository the gitweb page is showing, you could possibly add a file to the repository, when shown on the page will inject malicious javascript code for example.

If you run gitweb for repositories where only yourself (an people you trust) has those permissions, this vulnerability is rather harmless. But if you are running gitweb for a large FOSS project with a lot of committers, you should be aware of that issue.

← PreviousPage 2 of 2