Everything I know about Python...

Learn to Write Pythonic Code!

Check out the book Writing Idiomatic Python!

Discuss Posts With Other Readers at discourse.jeffknupp.com!

Info on Free Tutoring Session For Women In STEM

In a previous post I announced that I would be permanently making by book, Writing Idiomatic Python, free for women in STEM. In addition, they would be entitled to two free hours of tutoring. The response was overwhelming. While everyone who emailed me got a free copy of the book, it just wasn't physically possible for me to tutor all who requested it. While I'd love to tutor everyone one-on-one, it's simply not possible.

Instead, I've decided to hold "office hours" (or a "group tutoring session") where participants can ask Python questions (or email them to me ahead of time) and I'll answer them, live. The first session will be this Saturday, September 13th, at 10:00 AM EST. If all goes well, additional sessions will follow. It will be held on Google Hangouts (unless someone has a better free suggestion), and all women (and those identifying as women) in STEM are free to join.

Email me your questions!

If you have a question that requires a bit of background or explanation, please feel free to email me with the subject "Office Hours" and describe your question. I'll do my best to answer all questions I receive ahead of time.

See you soon

I'm really looking forward to this and hoping it goes well. If you're down, I'll see you in a week!

Read on →

What is a NoSQL Database? Learn By Writing One In Python

NoSQL is a term that has become ubiquitous in recent years. But what does "NoSQL" actually mean? How and why is it useful? In this article, we'll answer these questions by creating a toy NoSQL database in pure Python (or, as I like to call it, "slightly structured pseudo-code").

Read on →

Go is Fun, Familiar, and FAST

Over the past few months, in my (nonexistent) spare time, I've been playing around with Go, the Google backed language created by some of my programming heroes. At this point, it feels to me like a cross between a much nicer C and a bit stricter (in a good way) Python. After you get past all the language niceties, the ultimate trade-off versus an interpreted language like Python is static typing for speed and increased type safety. And that's something I'm at least willing to explore.

Read on →

How Do You Rewrite a Project From Scratch Once It's On GitHub?

Rather than an information-laden article, this post is a real question about a situation I'm currently in and need help with. The setup is simple: I have a project (sandman) on GitHub with a reasonably long commit history and list of contributors. I've re-written the project from scratch. It shares no git history with the original project. How do I make the new project the official version (without offending those who contributed to the original one)?

My Choices

As I see it, I have three choices. The first is just to delete the old repo, rename the new repo, and call it a day. None of the old project will be preserved. On a positive note, however, the commit history will be clean and accurate, and reflect exactly what work was done on the project.

Or I could "migrate" the old project to the new one, by simply adding the new files in the old repo and deleting any others that are no longer used (almost all of the old files). In this way, I keep the commit history and contributors of the original project, but at the cost of a weird history that doesn't make much sense. It would really be the history of two separate projects spliced together at a specific point.

The third choice, of course, is to just keep the old project the way it is and not use the rewrite. Each day that goes by, though, this seems less and less viable a solution, as the new project is almost at feature parity with the old. That brings me to another question:

Versioning and Backwards Incompatibility

How do I version the new project? The old project never hit 1.0 and thus it could be argued the API was always open to breaking changes, but this isn't a change to the API, it's an entirely new and different API. The current version of sandman is something like 0.9.8. If I replaced the old project with the new one, what would the version be? Keep in mind that for PyPI, the version would need to be higher than the version of the old project for PyPI to consider the new package the latest version.


I'm really kind of stuck here, which is why I'm asking for help. My hope is someone much smarter than me sees another solution, or a better way to implement one of the ones I mentioned. So please, if you have any ideas, let me know! Feel free to either leave a comment here or in the thread on Chat For Smart People.

Read on →

Web Analytics