HNHacker News
TopNewBestAskShowJobs

b3tta

120 karma · joined August 23, 2012

submissionscomments
b3tta··on Equalize.js now equalizes height or width of child elements
I know that. In fact I use jQuery in almost every website I'm writing, because I need backwards compatibility with older browsers. But since I started working on a certain website which only supports IE9, I'm pretty much only using jQuery for $.fn.animation. I just feel like it's a huge waste of computing time. Apart from that I think it's important to write "cross-library" plugins.
b3tta··on Equalize.js now equalizes height or width of child elements
sigh... Yet another simple plugin which needs jQuery for something which could be done in vanilla JS and still need less LOC.

Tim: A better approach would be to iterate through all children and find the maximum using elem.offset(Height|Width).

Then create a new <style> in the head for your plugin if it doesn't exist and append a new rule like:

  style.innerHTML += '#' + (elem.id || (elem.id = 'eq' + (Date.now() % 1e9))) + '>*{' + equalize + ':' + val + '}';
If you don't like this you could still use elem.style.(width|height) (and maybe even detach the container beforehand to prevent unnecessary reflows), which will be faster and doesn't require a 90KB lib.
b3tta··on Mozilla brings back 64-bit builds of Firefox for Windows
Can someone explain me why it's so hard for Mozilla to have a x64 build? Why is the core of Firefox not platform independent? I just don't get it.
b3tta··on The Pirate Bay Is The World’s Most Efficient Public Library
I don't understand why everyone feels the need to portrait piracy as something good.

I do it because I can.

b3tta··on IQ and Religion
I don't seem to understand why anybody would make such a correlation. I think the avarage IQ depends on how wealth and how well developed your country is, and not how many believe in religious stuff.
b3tta··on Zip Bomb
With Firefox (15.0.1) I get some really, really strange results with the second image.

When I opened it the first time, or everytime I press Ctrl+Shift+R it works, but it shows the URL, and a litte icon in the upper left corner: http://i.imgur.com/B7jFE.png

If I press F5 or Ctrl+R it doesnt work, just as you said.

b3tta··on Clearing up some things about LinkedIn mobile’s move from Rails to node.js
It's definitely true, that node.js isn't a full fledged framework, but I still wrote several projects using it and you know what? I don't regret it, as much as I don't regret my move from C++ to C over the past years. And for the memory usage: Yes, even my biggest project never needed more than 100MB of RAM (when not using the cluster module).

But I completely agree with "the rewrite thing". I guess the other factors made it necessary to still do it....

b3tta··on Why I think Node.JS is a terrible platform
Please don't just grab some random words from my post. I'm pretty sure you know that the sentence in question was just an idiom. And just so you know: I have experience in, and still regularly use C/C++, C#, Java, Haskell, Ruby, Python, Javascript, PHP. I don't know what node.js did to you (maybe you tried something as writing a whole webframework with node.js? or something as foolish as a file server?), but you should know that there are many projects out there which use node.js where it fits and it's running good (prime examples are Microsoft and LinkedIn).

> I'm sorry, but if you are only good in JS, or PHP, the very first thing you should do is become good with some better tools.

And I don't know what the hell is wrong with you, that you assume that you are the wisest of all men and know what is wrong with everything and what to use in any situation and what I know and what I do and what I should do...

> and have a cost you will pay during the lifetime of your application, in security, reliability, scalability and maintainability.

So thanks for this lesson. I swear I will spread the word, but before I will go and worship JS/PHP, as the little, stupid fanboy I am. (fyi that's called the language of sarcasm)

As I said: Don't go around and "insult" programming languages, because most of them have their right to exist and nobody forces you to use something you don't like, nor anybody else. Most programmer choose to use node.js and if they fail it's not necessarily the fault of the "tool" (though it can be), but also the fault of the programmer in question, by choosing a "tool" which didn't fit. I mean: You wouldn't try to put a screw in the wall with a hammer. Am I right?

b3tta··on Why I think Node.JS is a terrible platform
luriel wrote a nice answer, like a good, old hater would write. (You can't just go around and insult programming languages. They have feelings too, dude.)

is there any real advantage over I think that's the wrong way to choose a platform. Are you good in Ruby? Then use RoR. Are you good in JS? Then use node.js. Maybe RoR is a much better platform than node.js, maybe it's not. But I finished writing my framework/application 10 times, before you even typed RoR. :D Furthermore: You. Don't. Use. node.js. For. CPU heavy. tasks! Don't do it. For everything else I think it's a wonderful framework, if you want to write something I/O heavy.

btw: The strict asynchronous programming style, using JSs closures, is pretty much the same thing you would write in C (except for that you don't have closures). I recommend everyone to look at least once into https://github.com/joyent/libuv/ But unfortunately many "programmers" here won't do it, since C is stupid and for old farts. I mean: I can do anything in C# in a tenth of the time compared to you with C (http://programmers.stackexchange.com/q/164017)

b3tta··on JSON+UDP+DHT=Freedom
To the "Why UDP?" part:

For things like P2P UDP is a much better fit, because TCP sends an ACK (ACKnowledgement) to the sender for every received packet.

Since UDP is unreliable no such ACKs will be send and it's up to the programmer to detect packet loss. The latency is therefore with UDP lower (and hence throughput higher), because the provider can push packets without waiting for a response.

For instance in P2P the receiver only needs to send a NAK (Negative AcKnowledgment) if and only if a packet/part is missing and then it will be resend by the provider.

← PreviousPage 2 of 2