2016-03-04

Writing Again

It has certainly been a while since I have written. It will be an experience to start up again. The formula I have used in the past is to write about things I'm working on or feeling passionate about, and to lay out some element of that to share, either in pure informational or tutorial form, while occasionally whining or barking about something which perhaps I should or should not excerpt such effort.

In my new attempts, I will strive to further limit non-software development topics for this blog. I am thinking of a couple others specifically for electronic and energy experiments as I do like to tinker, and no other topics beyond those at the moment, even if politics does tend to affect my sensibilities.

I have nothing against other topics outright, but they seem more suited to other compartmentalized blogs or resources, and too, planning and writing, even about topics which I'm knowledgeable, takes time regardless of its enjoyment, and I would like this round to be more lasting, and hopefully reaching into my elder years; which would be a good run, and perhaps wishful dreaming :-)

My hope is this post will be a public, self inspiring or fulfilling way to kick start the process of writing again (and a reminder). Who knows, maybe it will lead to a YouTube channel as well, but I love the written format.

With more responsibility, maturity, and a family, I hope can keep at it, and it becomes something I can share with my children and family, and though they may or may not write about software, electronics, or energy, perhaps they will be inspired to produce content of their own, and discover the act of creation is just as much about learning and enjoyment as anything.

A sample of topics I am pondering for the software blog include

  • Programming Languages; including Java, Groovy, JavaScript, Python, C, C++, C#, Ceylon, Kotlin, Ruby, PHP, Go, and Web Assembly
  • the Amazon Cloud
  • Containers
  • Microservices; including Sprint Boot and Dropwizard
  • Data Stores
  • HTML5 Games and Phaser.io
  • Drone and Quadcopter Software
  • NetBeans and the NetBeans Platform
We will see.

For some relevant background, I am a husband, father, amateur experimenter, and software engineer with over 18 years experience architecting and implementing solutions for multiple computing profiles using various technologies and operating systems.

Currently, in my professional time, I work daily with the AWS Cloud, Groovy,  Java,  JavaScript, AngularJS, and Node.js plus other Web backend and front end technologies, and am a senior lead software engineer for a media company where internally we are focusing on distributed services, single page applications, and evolvable systems to support our business users and media partners as best as possible. It is a wonderful experience and set of teams.

With my current personal time, I am attempting game design and development as well as learning Drone technology. I also dabble in simple energy experiments such as salt water batteries and biodiesel, try to learn as much about physics and mathematics as I can find time, and have a few other interests.

Life is way too short, and goes by way too fast. See you next time.

2014-07-30

Gradle and Dynamically Setting Test.forkEvery

I ran into an interesting problem today when customizing my teams Gradle build. I wanted to be able to dynamically set the forkEvery value for our test tasks. So, using common property techniques, wrote:

test {

    if(project.hasProperty("test.forkEvery")){
        println "Setting the tests to fork every ${project.getProperty("test.forkEvery")} for project ${project.name}"
        forkEvery = project.getProperty("test.forkEvery")
    }
}

Through simple observation I knew the tests were completing too fast. No errors, but something was off. I hard coded the value to 1 (not quoted), and that worked fine. Hmmmm. Considering Groovy would print 1000 for this:
def l = 1L; l = "1000"; println l;
I had to assume something must be happening with type conversion, and Gradle is not giving me an error for it. The fix was Long.parseLong:
test {

    if(project.hasProperty("test.forkEvery")){
        println "Setting the tests to fork every ${project.getProperty("test.forkEvery")} for project ${project.name}"
        forkEvery = Long.parseLong(project.getProperty("test.forkEvery"))
    }
}