adlfkjfadslkjfads

Python Tip of the Day - Merging Dicts

Posted on Fri 03 August 2018 in Posts • Tagged with python, pythonTipOfTheDay

Python Tip of the Day - Merging Two Dicts


Continue reading

F-Strings Are F'ing Cool

Posted on Thu 12 July 2018 in Posts • Tagged with python, pythonTipOfTheDay, fstrings

Python 3.6 introduced a new way to format strings. They're really f-ing cool. Let's see why.


Continue reading

Py.test Basics

Posted on Fri 27 April 2018 in Posts • Tagged with python, testing, pytest, unittest

Learning some of the basics of Py.test


Continue reading

Python Tip of the Day - Simple HTTP Server

Posted on Tue 17 April 2018 in Posts • Tagged with pythonTipOfTheDay, python

Using Python's Simple HTTP Server for fun and profit (and quickly sharing files)


Continue reading

Python Tip of the Day - Double If's in Comprehensions

Posted on Wed 11 April 2018 in Posts • Tagged with pythonTipOfTheDay, python

So I was reviewing a coworkers pull request today and saw something I hadn't seen in Python before. As it turns out you can have multiple if clauses on a list comprehension. For example:

>>> [v for v in range(50) if v % 2 == 0 if v > 10]  # all even numbers …

Continue reading

Python Tip of the Day - Logging basicConfig

Posted on Wed 14 February 2018 in Posts • Tagged with pythonTipOfTheDay, logging, python

Oftentimes you just want to try out something related to logging in the REPL, or in a hacky script.  Wading through the docs on the logging module is this painful exercise in reading about handlers and formatters and other stuff you don't care about.

The simplest way to just get …


Continue reading

Code Refactor of the Day - Extracting Compound Conditionals

Posted on Mon 15 January 2018 in Posts • Tagged with codeRefactorOfTheDay, refactoring, quality, python

I'm currently doing the 30-Day Code Quality Challenge (https://www.codequalitychallenge.com), and today's exercise was an interesting one -- extract a compound conditional.

The idea of extracting a compound conditional is it's a refactor to try and improve the readability of code by giving a name to a complex boolean …


Continue reading

Python and Microsoft?

Posted on Wed 03 January 2018 in Posts • Tagged with python, news, microsoft

Much has been said about how Microsoft has changed in recent years, no longer the super closed-source monopolistic giant it once was.  Regardless of whether or not you believe the change is real or just at the surface, permanent or temporary, etc, there is definitely some interesting things that have …


Continue reading

Python Tip of the Day - subTest!

Posted on Sat 23 September 2017 in Posts • Tagged with pythonTipOfTheDay, testing, unittest, python

Coming from a jUnit background, one of the things I always missed with the vanilla Python unitttest library was parameterized tests.  Oftentimes when writing unit tests for a particular unit you find yourself writing effectively the same test over and over again, but with different inputs. Wouldn't it be nice …


Continue reading

Serverless Microservices and Python (with tests!) - Part 2

Posted on Fri 28 July 2017 in Posts • Tagged with lambda, serverless, microservices, aws, python

Ok, so in part 1 of this series, I started off by exploring the use of Lambda and API Gateway as a tool for building scalable microservices in Python. I largely focussed on taking an existing tutorial, and building out some unit tests for it, as well as some supplementary …


Continue reading