I'd really enjoy reading about how to setup a PyPI mirror like the one you use in your development/deployment workflow. It seems like a really good idea, considering I've had problems with PyPI at really inconvenient times in the past.
You just set it up on a local server, and upload packages the same way they are uploaded to real PyPI.
python setup.py register sdist upload
You can specify alternate PyPI server with a ~/.pypirc. There are probably other ways to do this. What's nice about this is you can upload your own private packages or your own personal forks of packages. We do both.
I've used ClueReleaseManager to great effect in the past. It lazy loads from an upstream PyPI so you don't need to maintain a full mirror. If you use the same instance as your main PyPI mirror for developing and CI/deployment you never have to worry about syncing manually: any package you develop with will be in the cache by the time your code hits the CI server.
Out of curiosity, in a situation where you are doing negligible condition testing, is try–except still considered "more performant" than if–else flow control? For some reason (and I'm going to do so reading to get clarity on this point), I have had the silly notion that throwing and handling exceptions can be costly.
I don't think the try-except is 'more performant'. At least from the below benchmark test it doesn't seem to be so.
>>> from timeit import timeit
>>> timeit(setup='x=dict([(i,i*2) for i in range(10)])',stmt=
"""
if 20 in x:
pass""")
0.07420943164572691
>>> timeit(setup='x=dict([(i,i*2) for i in range(10)])',
stmt="""
try:
x[20]
except KeyError:
pass""")
1.1514457843105674
I am on my phone and cannot test this, but the try:except: construct is optimised for the non-exceptional path. The latter is probably faster for x[0] than x[20].
I agree with your short list of goals for students new to programming. Language should not matter for learning the basics of programming and Computer Science concepts. That being said, certain languages do make exploratory programming much easier than others:
The biggest issue I've faced with my courses where Java is used to teach the material is having to deal with Java IDEs and boilerplate code required to test tiny bits of code and the resulting behaviour. Interpreted languages or those with REPLs tend to not have this problem from what I've observed.
Note: I know about BeanShell, but I've had poor results with it. Maybe my environment is at fault, but it seems to miss functionality as basic as command history, which makes editing commands very tedious.
>I agree with your short list of goals for students new to programming. Language should not matter for learning the basics of programming and Computer Science concepts. That being said, certain languages do make exploratory programming much easier than others:
Pretty much. What really needs to be taught is that programming languages are tools. There are pros and cons to every language, so the best language for the concepts being taught should be used. A student that's come out of a good CS curriculum won't be a great programmer immediately after graduating. However, they'll have all the tools that they need to learn how to become a great programmer.
As someone taking a data structures course in post-secondary school where the facilitation language is Java, I've struggled more with the Java development environment than I have with actually understanding the data structures and the implementations. Even the Java specific implementations are simple once you can get your package and classes playing nice and compiled to bytecode.
This is not a slam on Java, just an observation from personal experience that some interpreted languages like Ruby and Python tend to make it easier to do casual programming exercises or tasks than those needing any compiling prior to execution, such as C, C++, and Java.
Why is having a Falun Gong affiliated site on HN frontpage a bad thing? I don't condone jjp9999's behaviour, just curious what Falun Gong has to do with anything?
I may eventually investigate a way to get it printed and bound in a classy hardcover with a dust jacket, similar to the photo of the book from _Why's guide site. This is one of few programming/tech books that I feel deserve such treatment.
Did they leak any private end-user information? As much as I can tolerate mischievous crackers violating corporate security and releasing intellectual property, I am loathe to give any praise to groups that victimize consumers/users by violating their right to privacy. It seems thoughtless and uncaring.
They specifically said they are not leaking all of the juicy user data they found.
It's nice that they did that, but it's kind of like breaking into your house and stealing everything except your Rolodex because, well, that would be a dick thing to do.
Not really a great analogy: unless you are employees or shareholders, it's not really your "house". If you are a dedicated customer, you may be more invested in the welfare of the company than most customers, who mostly just care about their personal interests (products or services they've paid for and any personal information that company keeps on record).
I tried to cook-up a comic store analogy where the loyal customer is most concerned about their orders and personal contact info being stolen than the merchandise of their favourite shop, but that analogy ignored the fact that what LulzSec did to Bethesda is essentially the following: making copies of the shop's inventory manifest, latest promotional program, and names of customers in a Rolodex, and then publishing all that info online (or in a local comic hobbist newsletter). Other than the loss of potential business and the trust of their customers, are the owners and employees likely to suffer as a result of this break-in? I tend to think that lost business will be minor, especially if customer privacy and interests are not noticeably compromised by the break-in.
Not trying to start a morality debate (unless that's welcome here?). I just wanted to point out why I tend to see "black hat security audits" as generally to the victims' benefit, when individuals aren't likely to suffer as a direct result. In the reality of my above analogy, the comic shop is likely going to invest in better security after this kind of break in, which is a positive outcome for the business and the customers. Only the very paranoid or "security minded" customers will choose to take their business elsewhere after the break-in, which likely amounts to very little lost business to the shop.