tryexceptpass

Could deep learning model a python to power your dockerized gaming AI while you cruise within the confines of subspace?

Hacking Together a Simple Graphical Python Debugger

Zero-to-Debugging in 15 mins

You don’t realize the value of a debugger until you’re stuck working on a hard-to-visualize problem. But once you fire up a development environment with decent debugging capabilities, you’ll never look back.

Want to know where you’re at in code execution? What’s taking so long? Just pause it and check.

Wonder what value is assigned to that variable? Mouse over it.

Want to skip a bunch of code and continue running from a different section? Go for it.

Sometimes print(variable_name) is just not enough to give you an idea of what’s going on with your project. This is when a good debugger can help you figuring things out.

Continue reading

A Python Ate My GUI - Part 3: Implementation

Time to Bootstrap your D3, pick up that Python and hop on the Autobahn

If you aren’t aware of my earlier posts, check out Part 1 and Part 2 of this series so that you get some context for this ongoing exercise.

Since I started thinking about and working on these posts, I’ve also been developing the ideas on GitHub as a side project I called sofi.

Sofi is a Python 3 package that serves as the starter implementation of the design discussed in Part 2: a system that will generate the necessary HTML and JavaScript code typically needed to produce a single-page application and serve it up through WebSockets (not an HTTP server).

Continue reading

Engineering the Tests that Matter

Going beyond the checkbox

As I sit in my standard issued cubicle, going through a typical test results report from the typical external test shop, I begin to shake my head in disgust.

I’m looking at a spreadsheet with endless rows and columns that associate a thumbs up / thumbs down with each one-liner that’s supposed to describe the test that executed.

What does all of this mean? Does that mean the test completed? Aborted? What does a thumbs up mean if a high priority issue was logged against it? Wait! If I read through this issue, the comments trail indicates that the test itself — not the item being tested — was modified to get a passing result! What is all this? Does any of it actually imply any type of quality level in the product that I’m testing?

Continue reading

A Python Ate My GUI - Part 2: Design

Creating a solution

In the first part of this series, we discussed a few existing modules that give us tools for building interfaces. I promised to come back with some ideas on how I would attempt to solve the situation, and this post is intended to cover aspects of my initial design.

However, first I need to discuss one more point on existing modules. In case you’re not aware, PyCon 2016 happened a few wks ago in Portland, and amongst the many wonderful talks, keynotes and open spaces, there was one in particular that is relevant to the topic of our discussion here: Russell Keith Magee’s talk on BeeWare and the work he’s done to solve the same problem. I highly recommend you take a look and help out with his projects if you can. It’s definitely a bold and brave solution that’s highly complex, but he already has it at a usable state and deserves massive props for going down that path. The Podcast.__init__ guys also have a great interview with him going over the details.

Continue reading

The Python that Speaks Whale

Using docker-py to interact with containers

“You should really be looking at Vagrant” — he said while I struggled with the keyboard, as if pressing the keys harder was going to magically make it work.

I had recently completed a utility — you know, one of those things that slurp in data from some black hole in a distant corner of the universe, marries it with the structure of a different time-space continuum, and magically spawns a pretty visual representation for mere mortals to easily consume — and I was having the hardest time getting all the pieces together for a demo on a laptop running that OS (yes, that one).

My buddy was trying to point me to a system that helps provision virtual machines from a simple configuration file. A solution which was becoming common in application distribution and deployment, as well as a method to standardize development environments.

Continue reading

A Python Ate My GUI

Thoughts on the future of Python and graphical interfaces

Staring at my coworkers, already knowing the inevitability of the situation, my eyes roll as the argument starts anew:

“I told you I can write that code twice as fast, in half as many lines and they’ll be cleaner and more readable than yours will ever be! Python is awesome!” — said the one guy.

“Whatever you say, you’ll never be able to make a UI that’s half as good as this. It won’t look pretty and no one will want to use it!” — replied the other — “Probably can’t even make it run on Windows” — he mumbled to himself while walking away.

Some years ago this was a regular exchange between coworkers, and while they were mostly messing around, there was still an element of truth to it. Regardless of its capabilities, Python was mostly known as a “scripting” language — not really for graphical interfaces — and the world was still looking for a native OS feel in their GUI applications, which was not really accessible from Python without a lot of work.

Continue reading

Open Source Contributions Are Part of My Professional Development

Should we have the right to contribute to open source?

“Boy did I spend a bunch of time organizing all my issues today” — he said while trying not to sound like a whiner — “You know… I found this neat tool yesterday that easily integrates with our repository management software. It adds project management capabilities that would save us time. Might be interesting to take a look?” — He ended his sentence with a question, something that he absolutely hates doing, a sticking point he’s had since spending a lot of time with a coworker that incessantly did that. He definitely did not want to sound insecure while talking to his manager.

The manager looks up, away from the computer screen in which he was diligently reassigning issues to their newly requested releases, and instead answers with the dreaded: “Is that tool freeware? Did you download it?”. The programmer, a lonely, isolated peon that was simply trying to make his own life easier, was definitely not expecting that response, and so he answered with the unfiltered truth (those of you that often communicate with management know what I’m talking about).

Continue reading
Newer posts