Python has a number of nice features for the beginner programmer.
1) It is easy to learn
2) It has a REPL.
3) It has a large standard library, and most things things in the library are easy to use.
The library is not super abstracted and overly engineered like so many other tools.
4) It has a large universe of third party libraries that are useful and easy to install.
There are bindings to many C/C++ and Fortran libraries. Things like numpy, scipy, and matplotlib.
5) The language and its libraries work on Windows/Linux/Mac.
6) The language is good at allowing one to focus on the problem at hand without worrying so much about minutiae of the language.
7) It supports imperative and object-oriented programming and has some support for functional style programming with map, filter, lambdas and list comprehensions. The functional programming support is on the weak side, but at least there is something.
The language also has some down sides.
1) Python hides low level details from the programmer. As a student learning about programming, ones needs to understand this stuff. Thus 'C' should also be taught.
2) It has been my experience that dynamic typing is useful for relativity small single person tasks. Somewhere around 30,000 lines, one begins to wish for static type checking. However, one needs a good type system. The rise of generics has greatly improved modern statically typed languages.
After reading "Learn You a Haskell For Great Good", I think all programmers should learn Haskell.
It is not really just about learning Haskell either, but understanding the power of function abstraction, combinators, referential integrity, organizing data, and managing side effects.
It has been my understanding that an API cannot be copyrighted because the API is a fact. We would not have Linux otherwise. I believe copyrighting APIs would be an even worse nightmare than patents.
Say you want a stack.
push,
pop,
empty.
Well, you'll never be able to write one without paying up to somebody.
A friend of mine once told me about optimal stopping theory.
He said if you could go on 100 dates,
and had choose to one to marry,
and you had to make the decision after a date,
and without being able to choose a previous date,
when should you stop.
The answer for some sample size 'n' is to automatically discard the first n/e dates.
Then choose the first date that is better than the best one already seen.
100/e is 37. http://en.wikipedia.org/wiki/S...
It is still n(log n) average case.
I'll grant you that if speed is super critical, that you're going to want an in place algorithm, in a language like C++.
Without any added explanation it is of course gibberish.
However, I think with an additional fairly brief explanation of symbols in the example, it would be quite clear to somebody with decent mathematical/logical thinking skills. And if the person doesn't poses those skills, then there is really no point in trying. It is certainly a nice addition to a description in English as it removes any ambiguity. Conciseness is often nice, because it doesn't allow any room for extraneous stuff. Of course, sometimes very concise code can still be difficult to understand.
If they are sentient, and require the same resources as humans, and are more intelligent than humans, it seems safe to assume they will want all the resources for themselves. If they are smarter, then its not hard to imagine them attempting to eliminate humans.
Not only that, it really sounds like a couple people just did it on their vacation time because it personally annoyed them. Microsoft was not interested in actually putting it on a schedule to be fixed.
I am being to think that this right here is the reason to abolish the patent system entirely.
Clearly we don't want things that are obvious being patented.
However, we have no formal test for what is obvious.
Since we can't test for obviousness, both the patent office and the courts have decided to ignore obviousness, thus destroying any possible usefulness of a patent system.
Now if there could somehow be a useful test for obviousness that could be applied, then we could possibly reconsider the merits of having a patent system.
I don't see a formal test for obviousness ever coming to fruition though.
I wish it would go a step further and not give any apps access to the contacts. It seems to me that an app that needs a contact should make a request to the operating system. The operating system could present the contacts to the user to select one, and then the operating system could return an opaque handle representing the contact to the app. The opaque handle could then be used to send email or what not.
There are a few things with question 1 that are not clear.
"A full coffee cup labeled with a 6 and the world whole"
Does this mean there are currently 6 pennies in the cup?
Does this mean that the capacity of the cup is 6 pennies?
Does this mean that the capacity of the cup is 6 pennies and there are 6 pennies in it and thus no more can be added to it?
What do pennies have do with coffee?
Does the cup hold 6 ounces of coffee?
Did the 5 pennies come from the cup, leaving 1 in the cup?
Do you have 5 pennies but the cup is empty?
What is missing from what?
Do I need to put the 5 pennies back into the cup to make it whole?
Are there only 5 pennies in existence, and therefore I am missing 1 to fill up the cup.
Were 5 pennies removed from the cup and therefore I am missing the penny in the cup.
What a terribly worded question.
Although of the 4 choices, 1 is the only thing that could possibly work.
Multiple choice is a really dumb idea here too.
Personally, I think plasmas look better in the dark and LEDs look better once any amount of room lighting is added. I think a lot of people do most of their watching with some lighting on.
It seems to me that congress needs to revise the rules for obtaining and holding patents. I think that if the subject being patented can be recreated simply by having seen it in action or by a reading of the requirements, then it does not deserve a patent. So stuff like one-click or side to unlock would be excluded. There needs to be real hard work put forth on something before it should be considered an invention. We need to stop patenting mere ideas and obvious stuff. The hard work part should not be based on how hard the patent holder worked, but on how hard a challenger to the patent would have to work.
I do think a good system of rules would be hard to develop. The system should not be easily gamed. If it proves too difficult to write such a set of rules, then it seems to me that having a patent system is bad idea. Furthermore, most all inventions are going to be incremental improvements. Most fields have lots of people working in them. So if the increment of improvement is small and there are many people in the field, then clearly it won't be much work for others to achieve the same result, and hence the first to file concept seems grossly unfair. So now you have to decide what is a significant enough increment for something to warrant a patent. Perhaps if you have a mind like Tesla one could truly invent something stunning, but even then I have my doubts, for every Tesla there seems to a Marconi.
I have often wondered if an insurance company is the perfect vehicle to get rich.
step1) Undercut competition with cheaper rates to attract customers.
step2) Pay yourself as CEO an exorbitant salary.
step3) Hope a big disaster never strikes and roll with 1) and 2) for as long as possible.
If disaster strikes file for bankruptcy or hope for federal bailout.
I have been using PySide and Qt 4.8 which works great. However, the last time I looked PySide does not work with Qt5. Javascript was also supposed to be a first class citizen, and I can't find any info on how to get started with Javascript and Qt5 or any recent working examples. Finally Qt5 brought with it a new method for building interfaces(Qt Quick) and put the old widgets into maintenance mode only. However Qt Quick didn't have any widgets. Qt5 so far has been a huge disappointment to me.
Do you trust the CPI as a measure of inflation? It seems to me that a lot of things I care about get more expensive all the time (concerts, movies, eating out, drinks, hotels, gas, food). It feels like there is significant inflation to me, but I'll grant you that I have not researched this. It is interesting that home prices are left out of the CPI as this is the most significant purchase for most people and dwarfs their other expenses. Analyzing home prices at this point though is crazy. They went up way too fast and without the bank bailouts they would have come down a whole lot more than they did. From the perspective of somebody interested in buying a home, I know they would have been much cheaper if the FED hadn't bailed out the banks, and thus this looks like huge inflation to me.
If the quantitative easing money is to firm up the banks reserves, then this makes it safer for the banks to lend again, thus increasing the potential for inflation.
That last thought of the potential for inflation makes my head hurt. If the economy is running along great in high gear, then there will be lots of new construction and construction work, but there will also be loans to fund the construction and thus inflation.
I should note that I find inflation bad as I don't think it is good to deplete the buying power of somebody's savings.
It seems natural to me that any kind of economic expansion will run its course once the new developments are complete. Now the debt has to be paid back and the construction workers laid off. The development will have to shift to something else if possible.
Ok, now I am just rambling, but the debt=money concept and the true workings of the economy is hard to get one's head around.
I have read that Debt = Money.
Where is the other 3%?
How do hard owned assets play into this?
If one has fully paid for a home worth say $500,000, is there $500,000 in debt owed by somebody else to compensate?
What if the home was initially $250,000 and inflation brought it up to $500,000?
Python has a number of nice features for the beginner programmer.
1) It is easy to learn
2) It has a REPL.
3) It has a large standard library, and most things things in the library are easy to use.
The library is not super abstracted and overly engineered like so many other tools.
4) It has a large universe of third party libraries that are useful and easy to install.
There are bindings to many C/C++ and Fortran libraries. Things like numpy, scipy, and matplotlib.
5) The language and its libraries work on Windows/Linux/Mac.
6) The language is good at allowing one to focus on the problem at hand without worrying so much about minutiae of the language.
7) It supports imperative and object-oriented programming and has some support for functional style programming with map, filter, lambdas and list comprehensions. The functional programming support is on the weak side, but at least there is something.
The language also has some down sides.
1) Python hides low level details from the programmer. As a student learning about programming, ones needs to understand this stuff. Thus 'C' should also be taught.
2) It has been my experience that dynamic typing is useful for relativity small single person tasks. Somewhere around 30,000 lines, one begins to wish for static type checking. However, one needs a good type system. The rise of generics has greatly improved modern statically typed languages.
After reading "Learn You a Haskell For Great Good", I think all programmers should learn Haskell.
It is not really just about learning Haskell either, but understanding the power of function abstraction, combinators, referential integrity, organizing data, and managing side effects.
I guess I failed to understand how fair use plays into using an API. There are better comments below. I wish I could just delete the above post.
It has been my understanding that an API cannot be copyrighted because the API is a fact. We would not have Linux otherwise. I believe copyrighting APIs would be an even worse nightmare than patents.
Say you want a stack.
push,
pop,
empty.
Well, you'll never be able to write one without paying up to somebody.
A friend of mine once told me about optimal stopping theory.
He said if you could go on 100 dates,
and had choose to one to marry,
and you had to make the decision after a date,
and without being able to choose a previous date,
when should you stop.
The answer for some sample size 'n' is to automatically discard the first n/e dates.
Then choose the first date that is better than the best one already seen.
100/e is 37.
http://en.wikipedia.org/wiki/S...
It is still n(log n) average case. I'll grant you that if speed is super critical, that you're going to want an in place algorithm, in a language like C++.
Without any added explanation it is of course gibberish. However, I think with an additional fairly brief explanation of symbols in the example, it would be quite clear to somebody with decent mathematical/logical thinking skills. And if the person doesn't poses those skills, then there is really no point in trying. It is certainly a nice addition to a description in English as it removes any ambiguity. Conciseness is often nice, because it doesn't allow any room for extraneous stuff. Of course, sometimes very concise code can still be difficult to understand.
Slashdot messed up my post. Well, it was meant to be the 2 liner Haskell quicksort.
Should have paid attention to the preview, dang it.
quicksort [] = []
quicksort (x:xs) = quicksort [y | y x]
quicksort [] = [] quicksort (x:xs) = quicksort [y | y x]
If they are sentient, and require the same resources as humans, and are more intelligent than humans, it seems safe to assume they will want all the resources for themselves. If they are smarter, then its not hard to imagine them attempting to eliminate humans.
Not only that, it really sounds like a couple people just did it on their vacation time because it personally annoyed them. Microsoft was not interested in actually putting it on a schedule to be fixed.
The dirt above the rock looks a bit like a schnauzer with the face being in the very upper right.
The closure was over four days. It is not believable that Christie was unaware of this the entire time.
I am being to think that this right here is the reason to abolish the patent system entirely. Clearly we don't want things that are obvious being patented. However, we have no formal test for what is obvious. Since we can't test for obviousness, both the patent office and the courts have decided to ignore obviousness, thus destroying any possible usefulness of a patent system. Now if there could somehow be a useful test for obviousness that could be applied, then we could possibly reconsider the merits of having a patent system. I don't see a formal test for obviousness ever coming to fruition though.
I wish it would go a step further and not give any apps access to the contacts. It seems to me that an app that needs a contact should make a request to the operating system. The operating system could present the contacts to the user to select one, and then the operating system could return an opaque handle representing the contact to the app. The opaque handle could then be used to send email or what not.
There are a few things with question 1 that are not clear.
"A full coffee cup labeled with a 6 and the world whole"
Does this mean there are currently 6 pennies in the cup?
Does this mean that the capacity of the cup is 6 pennies?
Does this mean that the capacity of the cup is 6 pennies and there are 6 pennies in it and thus no more can be added to it?
What do pennies have do with coffee?
Does the cup hold 6 ounces of coffee?
Did the 5 pennies come from the cup, leaving 1 in the cup?
Do you have 5 pennies but the cup is empty?
What is missing from what?
Do I need to put the 5 pennies back into the cup to make it whole?
Are there only 5 pennies in existence, and therefore I am missing 1 to fill up the cup.
Were 5 pennies removed from the cup and therefore I am missing the penny in the cup.
What a terribly worded question.
Although of the 4 choices, 1 is the only thing that could possibly work.
Multiple choice is a really dumb idea here too.
Personally, I think plasmas look better in the dark and LEDs look better once any amount of room lighting is added. I think a lot of people do most of their watching with some lighting on.
Are they trying to say through this analysis that your potential maximum life span would be N years and that you are some percentage of the way there?
It seems to me that congress needs to revise the rules for obtaining and holding patents. I think that if the subject being patented can be recreated simply by having seen it in action or by a reading of the requirements, then it does not deserve a patent. So stuff like one-click or side to unlock would be excluded. There needs to be real hard work put forth on something before it should be considered an invention. We need to stop patenting mere ideas and obvious stuff. The hard work part should not be based on how hard the patent holder worked, but on how hard a challenger to the patent would have to work. I do think a good system of rules would be hard to develop. The system should not be easily gamed. If it proves too difficult to write such a set of rules, then it seems to me that having a patent system is bad idea. Furthermore, most all inventions are going to be incremental improvements. Most fields have lots of people working in them. So if the increment of improvement is small and there are many people in the field, then clearly it won't be much work for others to achieve the same result, and hence the first to file concept seems grossly unfair. So now you have to decide what is a significant enough increment for something to warrant a patent. Perhaps if you have a mind like Tesla one could truly invent something stunning, but even then I have my doubts, for every Tesla there seems to a Marconi.
I have often wondered if an insurance company is the perfect vehicle to get rich.
step1) Undercut competition with cheaper rates to attract customers.
step2) Pay yourself as CEO an exorbitant salary.
step3) Hope a big disaster never strikes and roll with 1) and 2) for as long as possible.
If disaster strikes file for bankruptcy or hope for federal bailout.
I have been using PySide and Qt 4.8 which works great. However, the last time I looked PySide does not work with Qt5. Javascript was also supposed to be a first class citizen, and I can't find any info on how to get started with Javascript and Qt5 or any recent working examples. Finally Qt5 brought with it a new method for building interfaces(Qt Quick) and put the old widgets into maintenance mode only. However Qt Quick didn't have any widgets. Qt5 so far has been a huge disappointment to me.
" you can use it to buy valuable assets that may appreciate or at least hold purchasing power"
What investments are these?
Do you trust the CPI as a measure of inflation? It seems to me that a lot of things I care about get more expensive all the time (concerts, movies, eating out, drinks, hotels, gas, food). It feels like there is significant inflation to me, but I'll grant you that I have not researched this. It is interesting that home prices are left out of the CPI as this is the most significant purchase for most people and dwarfs their other expenses. Analyzing home prices at this point though is crazy. They went up way too fast and without the bank bailouts they would have come down a whole lot more than they did. From the perspective of somebody interested in buying a home, I know they would have been much cheaper if the FED hadn't bailed out the banks, and thus this looks like huge inflation to me.
If the quantitative easing money is to firm up the banks reserves, then this makes it safer for the banks to lend again, thus increasing the potential for inflation.
That last thought of the potential for inflation makes my head hurt. If the economy is running along great in high gear, then there will be lots of new construction and construction work, but there will also be loans to fund the construction and thus inflation.
I should note that I find inflation bad as I don't think it is good to deplete the buying power of somebody's savings.
It seems natural to me that any kind of economic expansion will run its course once the new developments are complete. Now the debt has to be paid back and the construction workers laid off. The development will have to shift to something else if possible.
Ok, now I am just rambling, but the debt=money concept and the true workings of the economy is hard to get one's head around.
I have read that Debt = Money.
Where is the other 3%?
How do hard owned assets play into this?
If one has fully paid for a home worth say $500,000, is there $500,000 in debt owed by somebody else to compensate?
What if the home was initially $250,000 and inflation brought it up to $500,000?
eg.
range(5) -> [0, 1, 2, 3, 4] # n numbers starting at 0
range(3, 7) -> [3, 4, 5, 6] # [start, end)
range(3, 15, 2) -> [3, 5, 7, 9, 11, 13] # [start, end) with step increment
range(14, 2, -2) -> [14, 12, 10, 8, 6, 4] # using a negative increment
It goes upto but not including the last item.
If you were trying to compare lists, you can't compare characters and integers because they have different type. You could do
[ord('a'), ord('b'), ord('c')] == [97, 98, 99] -> True