Posts

Showing posts with the label hint

Extensible Database Tester in Python, with Permutations

Here is some Python code that allows you to generate all combinations of options by choosing one item from an arbitrary number of different lists.  Not only that, but each option is actually a data structure that also includes lots of metadata about the ramifications of the option, in addition to the option value itself. Let's say you're looking to run performance testing on different types of tables and underlying data arrangements in Amazon Redshift Spectrum.  You can devise a template SQL query that can be configurable in multiple ways.  For instance, you could choose between multiple tables or views from which to query data (say, if comparing Redshift to Redshift Spectrum performance), and you also want to see the performance of count(1) vs. count(*) to see if one uses more data or works quicker on Redshift vs. Spectrum.  Thus, you already have two lists of options, and need to come up with the four permutations of these options. The Groundwork Basically...

Passing "this" Around In Polymer

Lately, I have decided to write the front ends for my personal Web projects in Polymer .  It gives me the ability to construct the UI, and even tie in AJAX actions and database calls , by simply including Web Components as elements in the DOM, just like plain HTML.  To me, it seems less bloated and denser than even Angular 1 (sorry, haven't played with Angular 2 yet), not to mention plain JavaScript or JQuery where you still need to write out most of the interactions between the model, view, controller, and external APIs yourself.  The Web Components aspect was most appealing to me because now I could leverage previous work, standing on the shoulders of giants, rather than reinventing the wheel for the needed interactions.  Better yet, if I use Google's implementations of Web components, I can even get Material styling on my DOM elements with no extra work. However, Polymer suffers from some of the problems I've had with Perl too.  You really need to be in t...

Talk to me about Battleship… your job could depend on it!

The classic game “Battleship” has captivated military sailors and civilians alike for at least 100 years as players attempt to hone in on a strategy to destroy their opponent’s ships placed on a game board while avoiding detection and certain destruction of their own ships.  The game became one of the earliest home computer programs when it was released on the Z80 Compucolor back in 1979, according to Wikipedia’s sources.  And for more than 35 years since, it has been a concept one could use to test someone’s knowledge of programming a system in an elegant way. Recently, I sat in with a colleague of mine while he interviewed a prospective employee.  The idea of using Battleship as the pseudo-coding exercise came to him while he was surfing articles on the Internet regarding good thought exercises to engage interviewees.  We work for a company where object-oriented programming is the flavor of choice, and so we were interested in how our prospie would arrange the...

Is It Broken? Try Leaving It On

Image
Recently, I’ve acquired a bunch of vintage computer hardware from various sources, whether donated to me personally or stumbled upon during scavenger hunts through crazy places that used to be companies whose owners have pretty much turned into hoarders.  It’s been quite a tedious process getting some of these things working, but surprisingly, there have been very few instances lately where my skills with a soldering iron or my cache of loose parts has actually come in handy to fix something.  In fact, most things have come back to life surprisingly by simply plugging them in and giving them some time. Cases 1 & 2: Some Commodore 64 Computers Last week, a kind fellow who was moving granted me three Commodore 64 computers belonging to him and his brothers.  They grew up with these machines, and had a large collection of games and utilities on floppy disk.  There were also accessories such as floppy disk drives, joysticks, plenty of power supplies ...

Enough to be Dangerous: Open a different browser during a Protractor test

Those of you looking to test AngularJS apps may have particular use cases where multiple instances of the page need to be opened to simulate multiple instances of an application running.  Say you have a chat client, and you wish to simulate multiple users on different instances of the application.  Or, perhaps you want to run two separate windows so that one represents a user interacting with a service and the other represents an admin panel watching over the user.  No matter what your use case is, Protractor makes this easy.  Protractor is an end-to-end testing framework for Angular applications that integrates with the Selenium WebDriver for powerful browser automation and ties in tightly with Angular internals for very powerful testing possibilities. A Simple Case: More of the Same Current versions of Protractor as of this writing easily support the ability to add more browser instances of the type you defined in your configuration file's capabilities secti...

Sock it to the banks: transfer money smartly!

Modern times call for crafty experimentation and careful observations to avoid getting ripped off at every turn by some "service provider" seeking to collect fees from their "renters."  Guided by personal experience and altruistic desires, I would like to share some simple hints for transferring money between bank accounts quickly and efficiently without incurring fees. Use your bank's mobile app Many banks offer applications for your mobile device that can facilitate bank transfers by easily scanning and quickly depositing checks.  My experiences with several institutions show that while some banks are hesitant to give you the full amount immediately when a check deposit is made in person or ATM, checks for hundreds or even thousands of dollars clear completely and instantly when using a bank's mobile app.  The only potential fee with this method is that you need to have checks from all your banks so you can transfer money between each bank as needed...