Comment Re:Mod Parent Up (Score 1) 302
This is very messy code.
It could have been a lot shorter, too, with something like bottle.
This is very messy code.
It could have been a lot shorter, too, with something like bottle.
99% percent of the time, people use the search to basically type just enough text to get the item they want on top, and then press Enter. If your list of installed apps doesn't change frequently, over time you just learn what to type, and it becomes sort of a keyboard shortcut. You don't need a fullscreen search screen for that.
BTW, Start Menu in Win10 is not fixed size. It grows as you pin more tiles to it.
the user-visible part revolved around sidelining the much-maligned desktop replacement "start screen" in favor of something that slightly resembled the one in Windows 7. I
Have you actually seen Win 8.1? What you describe is what's coming up in Win 10 only; Win 8.1 still had the new Start screen in all its glory, not in the least resembling the Start Menu of Win7.
I'm almost certain that you could write a Python interpreter in Python if you really wanted to, but it probably wouldn't have as good execution performance as an interpreter written in C.
An interpreter would be slower. A JIT-compiler, OTOH...
VB6 compiler is written in C++.
What's even funnier is that C# and VB.NET compilers are also written in C++, even today (yes, there's Roslyn, but Roslyn-based compilers haven't shipped stable releases yet; the ones in VS 2013 are still the C++ ones).
Why isn't Python written in Python?
You mean, like this?
It's actually really simple (though I agree that it is surprising): if an identifier is assigned inside a code block (which is e.g. a body of function or a class; but not a body of a loop or a conditional statement), that variable is treated as a local variable throughout that entire block, unless there is a "global" declaration for it in that block. So:
x = 1; y = 2
def f():
x = y
def g():
y = x
def h():
global x
x = y
def m():
print(x)
x = y
Inside f, x is a local (because it is assigned to), and y is a global. Inside g, y is a local and x is a global. Inside h, both x and y are globals.
This gets more interesting in m, where you'll get an error trying to read an unassigned variable when printing x, because x is treated as a local throughout the body, not after assignment (and the scope is still lexical, not dynamic - it doesn't even matter if assignment executes or not).
"C-based" is modern speak for "Algol-derived" for people who don't know what Algol is.
I'd pick VisualBasic over Python as a beginners language.Plus VisualStudio is really good; its a good IDE, good debugger; its stable, its free; its widely used in the 'real world'
And you can use it for Python, with everything that you wrote still being true.
and you can focus 100% on "learning to program" without getting bogged down in configuring your environment or managing your toolchain or phyhon package management, library versions (python 2 vs 3), etc, etc, etc.
For this kind of stuff you really don't need to. I would be extremely surprised if all the tasks that he covers in his class wouldn't be covered even by the base Python install downloaded from http://python.org/ (which PTVS will even tell you to do if it finds that you don't have Python). And if that is not true, then a prepackaged Python distro like Anaconda - again, a single-click install - will surely be enough.
Besides, VB.NET is basically C# with training wheels; so you switch BEGIN and END for curly braces, realize procedures are just functions that return "nothing", and a little bit of other syntax and you are up and running in something that is pretty relevant.
I would argue that the cruft that VB.NET puts on top of C# is mostly useless as training wheels - it's no big difference between IF..END IF and curly braces - and in some cases is actively harmful because it uses its own terminology that is not shared with any other programming language, in lieu of terms that are commonly used throughout the field (like MustOverride/MustInherit instead of abstract).
Basically, if you are teaching people VB, you might as well teach them C# right away. It'll take 1% more effort, but they'll have a more useful skill from the get go, and knowledge of syntax will help them when it'll come to C++, Java, JavaScript etc.
This is exactly why Python is so popular as a teaching language these days - it also lets you skip most of the boilerplate for the initial exercises, and focus on the core concepts like conceptual execution, the notion of variables and values, conditionals and loops etc. It's a true OO ("everything is an object") language, but you won't ever see a class or a method call in hello world type code.
Oh, and it has a built-in turtle graphics package. I don't think a better tool to explain things such as loops and recursion has ever been devised.
It also randomly renames things that have well-established terms already. E.g. "abstract" methods - all languages that have them, have agreed on the meaning of it for the past 30 years or so. But VB calls them "MustOverride". And "abstract" on classes is "MustInherit". And those labels don't even make much sense, because, taken literally, they make claims that are plainly not true (you don't have to inherit from an abstract class - you just can't instantiate its instances; and even if you do inherit, you don't have to override any abstract methods - it's just that your class is also abstract if you don't).
There are over a hundred different altcoins by now. What makes this one so different that it's Slashdot-front-page worthy?
And then there's the new HP Stream netbooks (they don't call it them, but a 11" notebook for $200 is a netbook, IMO).
It doesn't explain admin roles (where there are a lot), and I don't think that low-level HR jobs are all that cushy, either, or pay well compared to developers, especially a few years in when you get a couple of raises and associated cash bonuses.
FWIW, the (immigrant) women who are devs or dev managers do pretty well for themselves - I'm talking about senior positions here, the ones where combined base pay and bonuses would typically go $200k and above.
You know who has trouble with "bad cops?" The people who don't respect authority in the first place. The people who have done things that harm others and the society at large. My daughter will never be in a confrontation with the authorities - never become a Michael Brown - because she has been raised to understand the need for the police and for keeping the peace (as much as I can teach her).
Your daughter will be in confrontation with authorities if, say, her house gets SWATed on a false charge (because an unreliable informant pointed at it), or simply because they got the wrong address or the wrong door. She won't get a chance to say "yes sir, please and thank you", because she won't be asked - the first thing she'll know is when her door is blown off the hinges with a shotgun and a flashbang comes in. Maybe it lands into her baby's crib, too. Maybe she gets a limb or two broken when they put her face down into the floow. Best case, they will only shoot the dogs and mess up the room with the entrance before they figure out something's wrong and leave (with no apologies and no compensation for damages).
Or perhaps she'll be driving around with a couple thousand dollars in cash, that she won in a lottery, and gets stopped by cops because they'll claim she's speeding (but really because she's cute). And when they see the money they will claim that such a large amount in cash is suspicious, and arrest it as proceeds from drug sales, because they get to pocket a good part of it for their PD (i.e. to buy more toys like MRAPs and
If she is black, it might get even more interesting. For example, during a routine traffic stop (for which she needn't do anything wrong, they might just be randomly pulling people over) an officer will ask her for ID, and she'll reach for her pocket because that's where the wallet is... and get shot point blank because the officer thought she's reaching for the gun. Because that's what he thinks of first when he sees a black person reach for their waist.
Or maybe she'll get arrested on an outright false charge just because she happens to come across a cop who "just hates niggers, that is all".
FYI, all of the above is not a figment of my imagination. It's all real stories that happened right here in USA with different people. The chances of something like that affecting your daughter are still orders of magnitude higher than the chances of being killed by a terrorist. So rather promoting more surveillance state, you might want to talk to your representative in Congress about police militarization first.
"Remember, extremism in the nondefense of moderation is not a virtue." -- Peter Neumann, about usenet