Log in

No account? Create an account
Don't Reinvent the Wheel

In software development this phrase, "Don't reinvent the wheel" is thrown out as an important mantra to follow. The main problem is that this gets thrown out there without looking at the wheel market. Clearly who ever said this doesn't make use of wheels. There are innovative wheels all over the place.

Do you drive a truck, car, tractor, or a wheel barrow? Guess what, someone determined that the old wheel wasn't good enough for those and invented a new one.

Just take a look at the Wikipedia page on the phrase. It is less about building the same thing and more about building something new with an understanding of the old.

Future Of Testing Recap

As a software tester, I started looking advice/resources and came across talks by James Bach. And he has really resonated with me. Other blogs and information I find lacking. I wasn't looking for tutorials on how to utilize tools, I wanted testing methodology and communication I wanted more of what James talks about in Future of the Software Testing Role. This is my opinionated summary of this talk, some of it is direct quotes some is my interpretation others are my closest approximation to what he said, but it all indicates the general time for when he said it:

2:45 — At this point James is setting the stage of where testing has been going and what has been driving it. He references the Agile movement and how this is a process set by developers and not testers, which is why you don't see testing as part of the process but just a side effect of the team doing work.

4:00 — He expresses that Agile's testing approach and his own are both in response to bad testing/testers. He is looking to improve the quality of the craft while feels Agile wants it gone.

4:30 — At this point James starts to make the case for specialization, but does really like the idea from Agile that people take on different roles, everyone should be testing. He later expands on this (1:07:00) saying he would like to see roles more like a villa.

Read more...Collapse )
Tags: ,

Continuous Delivery

I get the feeling that I'm doing something wrong. For whatever reason I keep trying to write little utility programs to make this continuous delivery stuff work. I'm going to specifically call out to GitLab and partly Jenkins, but expect it to apply to most tooling.

See, GitLab CI Runner allows for use of shell scripts, docker and such. Jenkins allows for Groovy scripts. But really that isn't what I want these little helper tools to utilize. The primary tool I'm thinking of is a program which sets my application version based on some git describe information.

Right now I'm installing these tools directly to the build server (in the case of Jenkins I could use the copy project artifacts). These tools are store in their own repository and used by the build scripts, so how come my CD system doesn't have a way for me to continuously deploy my helper programs to the system it uses? 

Graphical Interface Editing

I started doing some work with the WPF and the xaml editor. I don't really like GUI editing and certainly haven't found the right framework to do it in. But I've always been partial to editing the graphical source code rather than utilizing a WYSIWYG.

I just wanted to make the comment that WPF seems to have brought back editing the backend code rather then rely on the editor. I just wish it wasn't XML.

Continuous Integration Supporting Software
I like to start out by saying that I'm not very happy with Jenkins. Yep, that is what has prompted this post, and while I'm not very well verse in the different software options out there I wanted to write down a list of things I'd like to see from a CI system and maybe it will help me find the one I want.

The CI system needs to handle a few basic elements:

  • Obtain source code from source repository

  • Monitor source repository for changes

  • Execute programs

Jenkins provides a framework for plugins to add functionality to the CI system. It provides concepts such as:

  • Build machine

  • Jobs

  • Build artifacts

  • Dependencies

  • Credentials

This are also important concepts to have for a CI system. It also provides a Web UI where plugins can add UI elements to specific organized sections. It doesn't do a very good job of pipelining, they through out all this UI configuration work and force you to use the Groovy scripting language to define out all the stuff already provided by the UI configuration scheme.

So I'd like to see a system that it structured more like a library then a framework. Provide a way to stand up a web server, provide resources for show builds and their status, provide the algorithms for managing build machines, jobs, and their relationships. Expose those relationships for UI visuals to be created. Make these concepts a core part of the library:

  • Job relation

  • Product

  • Product relation

  • Environment

  • Product tests

  • Product release

  • Environment management

I'm having a hard time identifying the best way to put this list into words. Jenkins appears to have been fairly close to what I'm describing, but it lacked these concepts so the pipeline plugin came along and through out the UI for the groovy script. Maybe had I instead learn the groovy script for Jenkins I wouldn't be so annoyed with Jenkins now.

I've also done some work with the GitLab CI system and don't believe it would be any better for what I'm trying to achieve.

MSI Custom Action DLL Written in D
I'm tasked with testing software. I've implemented some ActiveX controls to make sure we integrate into software we don't have access to. That was a pretty exciting accomplishment but I've been haunted by the installers. Our installers include a DLL we have little insight on and calls a couple functions as a Custom Action, so I haven't been able to verify our installs work until we hand it over.

Well today I had some time to look at mocking something up for this and my success has come through utilizing a DLL written in D. To make this happen I used some help from "MSI Custom Action DLL" which provided the signature for the Custom Action function and what the primary header file was.

pragma(lib, "msi.lib");
UINT MsiSetPropertyW(MSIHANDLE hInstall,
	LPCWSTR   szName,       // property identifier, case-sensitive
	LPCWSTR   szValue);     // property value, null to undefine property

alias MSIHANDLE = uint;

export uint CustomActionFunction(MSIHANDLE hModule) { return ... }

Compilation was done from a Developer Command Prompt for AMD64 build. The generated DLL was then used to replace the black box DLL, and things were great.

dmd -m64 -shared -ofmain.dll main.d

Unable to access ecryptfs home folder
Update: I feel I have verified that my access issues with my encrypted home were with utilizing an older version of ecryptfs. Yesterday I installed the latest testing and was able to mount my private home.

I started using an encrypted home Private folder as outlined in some many posts. This is a cautionary tail probably due to a bug I do not wish to track down.

Recently I had my partition table corrupted and I was unable to access my data. Supposedly all you need to recover your data is to know your login information or the encryption passphrase.

To get to my data (while I was trying to figure out what was wrong with the system hard drive) I had installed a fresh Debian Linux and mounted my home directory as I've done so many times before. Now that I have my ~/.ecryptfs folder and my Private/.Private folders back in their proper location, it should have been a simple $ ecryptfs-mount-private and provide my old login password. No such luck, claims the passphrass is wrong.

Ok, ok. Maybe I did something wrong there. Now I'll just mount private manually. I already know the passphrase my login password was used to wrap so it should be simple enough. Nope. Still no luck mounting even though I know the encoding passphrase.

I think that there may be a version miss-match that has caused this issue, but at this time I have not verified this. This is a cautionary tail that recovery may not be as simple as it has been made out to be.

Parsing CSV Files that exceed Available Memory
It is not to unusual to read very large files and D does have a few options one is std.stdio.File. But using std.csv requires a input range of dchar which isn't available in the standard library (that I know of) for files.

I'd done some previous work in providing a file as range in my OpenStreetMap project. I had to make a few modifications so that it would provide an input range of dchar. While I tried to make it able to read files encode in UTF-8, UTF-16, or UTF-32, my plans were not completed since FileRange would need to read multiple bytes for those not UTF-8.

If someone is more interested then it should be possible to remove the cast on line 70 and make a conditional which correctly builds the character size desired before returning it.

Compatibility Settings and Internet Explorer

Recently I've been having to deal with IE and its compatibility modes. This has been a blast! Consider all of these factors:

  • Webpage is loaded within a WebBrowser control (as provided by Windows Forms or the like)
  • Page should support IE 9, 11, with emulation option for 7
  • Support ActiveX object events for IE 7 and IE 11 style hookups

There are a number of ways to dictate how IE should be rendering a page, here are a few.

  • Meta tag
  • Doc Type
  • IE Intranet compatibility setting
  • Registry Key

There are other ways of telling IE how it should render a page, but are the main ones when dealing with a browser control. I've ordered them by precedence, but the Registry Key can override the Doc Type.

  • The browser version IIS was told to load the page for.
  • The document mode the browser actually loaded the page for.

It would be really nice if you could render your page in IE 11 Edge if you're in a version 11 browser. You can, but any logic which depends on the browser version must be placed within Javascript and IIS version checks must be thrown out. Here are some things to keep in mind about these configurations.

The browser control is "perpetually stuck in IE 7 rendering mode." This means IIS will always be told to render in IE 7 unless otherwise specified. And this is specified in the Windows Registry. For debugging, be sure to follow the instructions about add the vshost executable when running with Visual Studio debugging (if you don't match the executable name exactly it won't use that entry, and for some reason I kept wanting to use vhost). Which this does not matter if IIS is not the one producing code for IE 7 or IE 11 (where that code is unsupported on the other version).

For some reason all of these different places make it so complicated to understand where the bug resides. Hopefully this helps others or my future self.

String Replacement Driven by Enum Data

Similar to my previous post "String Replacement Driven by CSV Data" I'd like to give another example which utilizes an enumeration. This approach is limited to replacing valid symbol names, but could be combined with other approaches.

import scriptlike;

enum Data : string {
REPLACEME = "ReplaceValue",
REPLACETHISTOO = "ValueReplaced",

void main() {
    auto file = "MyFile.txt";
    std.file.write(file, file

string replaceWithData(string str) {
    foreach(enumMember; EnumMembers!Data) {
        mixin("str = str.replace((cast(Data)r\""
          ~enumMember~"\").to!string, r\""~enumMember~"\");");
    return str;

Scripting With Dub

Unless I've got this wrong, Dub isn't very well setup for running short scripts. RDMD does a good job of taking a file and building it, but it lacks the ability to grab some nice helper libraries that exist outside the standard library, in my case "scriptlike." This has lead me to, assuming dub to be installed, utilizes a very basic dub.json file to run a script.

    "name": "postchanges",
    "sourcePaths": ["."],
    "targetType": "executable",
    "dependencies": {
        "scriptlike": ">=0.7.0",

Now running 'dub' in the directory will execute the script and include the specified dependencies.