Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror

Slashdot videos: Now with more Slashdot!

  • View

  • Discuss

  • Share

We've improved Slashdot's video section; now you can view our video interviews, product close-ups and site visits with all the usual Slashdot options to comment, share, etc. No more walled garden! It's a work in progress -- we hope you'll check it out (Learn more about the recent updates).

×

Comment: Re:too bad.... but... (Score 1) 634

by gnupun (#49345651) Attached to: Jeremy Clarkson Dismissed From Top Gear

Right, so you wouldn't punch a guy who called your mom, or someone close to you, a whore? We have to know exactly all those things that provoked Jeremy to punch this guy instead of rushing to a quick and inaccurate judgement.

Even if the guy intentionally put his food in the refrigerator, it would not justify flipping out and yelling for 20 minutes

The refrigerator thing would definitely deserve being yelled at, don't you think? Employees have been fired for lesser offences.

Comment: Re:It depends (Score 1) 481

by gnupun (#49340755) Attached to: No, It's Not Always Quicker To Do Things In Memory

The point is about assuming that disk write will be slower, when, in real life, some specific programs can be sped up by writing directly to disk.

No, you can't speed up something by using something that is at least 10,000 times slower than the alternative.

// Second part: disk-only
try {
writer = new BufferedWriter( new FileWriter("test.txt"));
startTime = System.currentTimeMillis();
for (int i=0; i < numIter; i++) {
writer.write(addString);
}
writer.flush();
writer.close();
endTime = System.currentTimeMillis();

Their so-called code that "directly writes to disk" in fact writes several KB to memory (using a BufferedWriter object) and then writes that memory to disk at several intervals. So their argument that disk-based code can be faster than memory-based code is completely false in this case.

This is what the javadocs for BufferedWriter state:

Writes text to a character-output stream, buffering characters so as to provide for the efficient writing of single characters, arrays, and strings.

The buffer size may be specified, or the default size may be accepted. The default is large enough for most purposes.

Comment: Re:It depends (Score 4, Informative) 481

by gnupun (#49337867) Attached to: No, It's Not Always Quicker To Do Things In Memory

There's nothing wrong with Java or Python, but the programmer is inexperienced. Java and Python strings are immutable. So, any time they concatenate a single character to an existing string, the Java runtime creates a brand new string, leaving the original string intact (since it is immutable). So if they create a million character string using using million concatenations, guess what, a million new strings are created and that's very slow. A better solution is to use a mutable String aka, StringBuilder.

But the right solution is to use a small buffer, say 16KB to 100KB in size, fill that with characters and flush that buffer to disk every time it's full. The speed would be same as any other method, but the max memory used is 20x smaller.

Comment: Re:my experience: (Score 1, Insightful) 264

by gnupun (#49334819) Attached to: Developers and the Fear of Apple

I'm pretty sure Apple doesn't give a crap about what 99% of developers do or say.

When most mobile developers make 1/5th or 1/10th minimum wage, you can treat them like panhandlers -- no respect. Even though the millions of 99 cent/free apps are the main and only reason Apple has sold hundreds of millions of iPhones/iPads. If desktops and laptops had such a vast array of apps created by modern-day slave labor, I doubt people would use the inferior, small screen phones or tablets.

Comment: Re:Youtube? (Score 4, Informative) 197

by gnupun (#49325537) Attached to: Pixar Releases Free Version of RenderMan

Yes, they are so strict about commercial use they don't even allow non-profit orgs to make money off it.
According to the ncr faq:

12. Can Non-Commercial RenderMan be used to create content by cultural, religious, or other 501c(3) non-profit organizations that generate revenue through entrance or member fees, service charges, subscriptions etc?

If a fee is charged to access content that is created by Non-Commercial RenderMan, then that usage falls into the category of commercial use. We appreciate there are borderline situations so please contact us at rendermansales@pixar.com if you require additional clarification.

Comment: Re:Is the smartwatch fad stillborn? (Score 1) 60

by gnupun (#49318073) Attached to: Lenovo CEO Reportedly Posts Image of Next Gen Moto 360 Smartwatch

Tablets are huge sellers, second only to smartphones, which outsell everything else by massive margins.

Any idea why tablets outsell laptops? I think it's because tablets have millions of apps for a dollar or for free. However, if you were to use tablets for 2-3 hours a day, won't you get arm/hand strain from carrying the tablet for hours at a time. There is no such strain with laptops as you typically place them on a table and don't have to carry them. Tablet type devices are useful for occasional use (like on Star Trek). But for constant use, laptops/desktops are far superior, ergonomically.

Comment: Re:It is a start (Score 4, Insightful) 233

Tests aren't needed.

How else will you determine whether someone is worthy of entry to the next level of education or a job? Aren't job interviews tests? Do you just ship software to customers without doing any testing?

Socrates needed no tests. Buddha never taught with a closed fist holding some knowledge back.

These people loved knowledge and were probably already well off. To other people, education is a means to getting a job and therefore, survival.

Comment: Re:The problem isn't cloud technology itself. (Score 1) 84

by gnupun (#49306611) Attached to: How 'The Cloud' Eats Away at Your Online Privacy (Video)

And how do you know the binary code running on the server was generated using exactly the same open source code you have been provided with? IOW, the code could be modified without the customer knowing about privacy breaches. Don't be so naive when it comes to security.

Administration: An ingenious abstraction in politics, designed to receive the kicks and cuffs due to the premier or president. -- Ambrose Bierce

Working...