BillGoates
The points you mention should be open to debate, based on open and truthful information.
And if the points of view are so incompatible that no reasonable solution is possible maybe we should go our different ways. Why not have state without police. There are states or countries with little to none taxes, or villages where you can walk around nude.
But if we keep going into the direction we are going now, things will become very grim. One way or another a side will try to force their opinion upon others. And the price the other side has to pay could be unrealistically high. You cannot ask someone to starve to death for your sense of safety.
At this point saying that there is zero doubt at this is 100% untrue. To put it mildly, the scientific community is divided on this topic.
Till now hacker news has been my safe haven from politics and propaganda. I am sorry to see that going away also.
But if you insist on being right, you should stop travelling, stop using electricity or any modern device. They all pollute and potentially will cause some damage to someone's health.
My code would look more like:
function postdata(url, data, callback) {
$.ajax({
url: '/status',
type: 'POST',
dataType: 'json',
data: data,
success: function (received) { callback(received); }
});
}
var statusform;
(function(pub) {
var status = ""
pub.init = init;
function init() {
$('#new-status form').submit(function(e) {
submitdata();
e.preventDefault();
});
}
function submitdata() {
var data = {
text: getfieldvalue("textarea")
};
if (!data.text) { return; }
postdata("/status", data, function(received) {
status = received.status;
drawscreen();
});
}
function getfieldvalue(fieldname) {
return $('#new-status').find(fieldname).val();
}
function drawscreen() {
if (status) {
$('#statuses').append('<li>' + status + '</li>');
$('#new-status').find('textarea').val('');
status = "";
}
}
}) (statusform);
$(document).onload(statusform.init);
Note 1: This code sample is untested, but should give a good enough idea what I am trying to do.
Note 2: For extra type safety, use typescript interfaces to model data.It's a comedy show, you are supposed to laugh at the characters. None of them should be taken seriously, they consist mostly out of randomly selected quirks that change with each episode. The 'normal' people are just as silly as the nerds. If we were meant to relate to someone, it isn't Penny, but Leonard.
On an old laptop, changing the opacity, or set a different color of the same amount of divs takes about 50ms. The next timeout or interrupt, is on average 200ms later. The first screen draw is the slowest with 350ms.
I used absolute position for the divs, so that the browser doesn't have to recalculate the page after each update.
I would say the answer depends on what the target audience is, what kind of site it is, and how much time it will save.
So I would say, let them choose for themselves what works best. Loosing concentration once in a while because of the music might be a natural stopping point, and listening to music for a short time gets the brain rested enough for a next period of concentration.
Publishing intellectual property would be illegal, and I fail to see why anyone would fear Wikileaks for doing such.
I am fully supportive of open standards, but it's rare that companies together can develop one. The year 2019 I mentioned was wrong, the final specification of HTML 5 is planned for 2022. Even after half the spec has thrown out already.
So MS has to go back at what they did best. Embrace and extent. Make the existing specifications work, but add more (useful) functions. Such as 3D, printing documents or a real rich text editor. The other browser developers are already doing such, so if MS wants to stay significant, they will have to do something.
Compare the popularity of C# + VB.net to other languages to see .NET has less than 1/20th of the market. And that for a company that not so long ago dominated the software market.
.NET is useless for
* desktop applications, since the forward and backward compatibility is not guaranteed.
* Downloadable applications, because a 250mb library pack download is just too much.
* Web Startups and/or social applications, because of the (sql) server costs.
So the only use .NET has is for small corporate applications.
The only thing Silverlight is good for is playing DRM protected media.
@Balmer: Get rid of .NET. There are people who use it, and some of them actually like it, but it will never become the huge success you thought it would become. This also means Silverlight has to go. The JIT compiler, with an open sourced assembly language, could get a 2nd life in the browser.
For a next OS, have a good long look at Windows 2000. Start from there, and instead of adding millions lines of code, start rewriting to make it smaller and faster. That way you end up with a valid OS to use on mobile devices.
Put more effort into your webbrowser. Make it so that it can be used for any type of application. Don't wait for W3C, if it's up to them we will have to wait till 2019 for a complete HTML5 specification. The other browser developers will either follow, and if not, developers will decide if they make a windows only application. Make the browser the default UI layer of Windows. This time to prevent nasty lawsuits, make it easy for others to add their own navigational toolbar.
So in short, instead of trying to protect business with windows locked in technology, be more open, and out develop the other companies. Become the company again, where it pays off to develop on your platform.
Today I am somewhere between ENTP and INTP
ENTP (E: 1 N: 75 T: 50 P: 33)
Someone able to write C64 assembler games/demoes 25 years ago, will still be a great programmer today, even if he didn't touch a computer since then. The basics haven't changed that much, nothing that cannot be learned within a few weeks.
Older programmers are probably less likely to jump every new hype. For them it's just the nth way to do same, only without the already collected/own written libraries and tools. That could be a disadvantage when looking for a new job.
15 years ago you also could buy a second hand car for cheap, but since then the gas price quadrupled. You can have a DVD player for the same price as a VCR 20 years ago, but does it really mean the quality of life has improved? Over time we also lost quite a few things, like real food or personal service.
But still you are looking at now, and more specifically to your personal situation at the moment, and not on what's happening and what the future will bring.
If cheap labor disappears a part of that group will become competitors in an already overcrowded market. And as I mentioned before, the global marktplace and internet is going to work against us. We will end up fighting over breadcrumbs, and only a very few, those with a truly unique skillset, will manage to have a somewhat decent lifestyle.
What you also forget, a big part of our current wealth is based on air. On big loans we used to pay for cheap labor in far away countries. And one day those loans will have to be paid back.
But try to imagine what would happen to your life when the dollar would become complete worthless overnight. Do you have enough goods to buy your way around, or do you still have the right skills to make a decent earning?
Labor is the only good most people have, and it's worth is declining. The previous generation could maintain the same lifestyle, doing less work. For years the rich are getting richer and the poor get poorer, but the last years the middle class is shifting to poor as well.
The more "intangible" sorts of work are only getting paid, after the basics needs are paid, and thanks to the internet people are sharing those skills for free.
The total number of items = maxint + 1
So yes, test inclusively, but not only the special cases, but always. It will prevent bugs, make code more readable and give faster code,
Only it's not what Dijkstra advocates.
2) When iterating 20 <= i < 30 or 20 <= i <= 29 the result is the same. At the end of the loop i will be 30, so in both cases the next lower bound = previous upper bound + 1.
While typing I thought of a case where inclusive might be more confusing, When iterating to first + n. Then < would be better than <= first + n - 1.
But I think this has little to do with if 0 or 1 based arrays are better. Only the start is different, after that it's all the same.
2) Sorry, I don't have a clue what you mean. What's the difference between tests on subseqs from 0 or 1 based arrays?
2) Yes, but that has nothing to do with anything I wrote. Also calculating the length of a subset out of a 0 or 1 based array is the same, making your point completely irrelevant.
3) Where in the world do you read anything about rand()?
He arguments that option A is the least ugly one, but forgets that computers have maximum numbers.
According to Dijkstra, you should test if a variable is a valid integer like: 0 <= var < MaxInt + 1. The best possible outcome of such a test would be a compiler error.
His argument that sequences defined as min <= i < (max + 1) because (max + 1) - min = total number of items is just silly. Maybe true for maths, not so for programmers. When reading code, you want to know if the code is valid, not how many items there are in a list. And reading i <= Max instead of i < (max + 1) is simpler.
Secondly, his article is about 0 or 1 based arrays, not random selections. And in case of 1 based arrays, the max = total number of elements.
So option C is best.
About whether 0 or 1 based arrays are better. They both have their uses. 0 based for spatial coordinates, 1 based for lists and character positions.