Fixed-Length Level Logging in Winston

by Michael Scepaniak on November 29, 2015 in software development

Stones

Do you do Node.js development? Do you use winston for logging in your Node application? Are you a stickler for having consistently-aligned content in your log entries? Have you struggled to prevent the log level portion of your log entries from shifting the positioning of your log entry formatting? If so, you might find this helpful.

[click to continue reading…]

{ 0 comments }

Fall Splendor

“Where there is great power, there is great responsibility”
– Winston Churchill

If you have a Java-based application that makes HTTP requests, there’s a good chance you are using Apache HttpClient to make these requests. If the application in question needs to make these requests at scale or with any sort of concurrency, there’s a good chance that you are using HttpClient with the PoolingHttpClientConnectionManager.

If you aren’t familiar with the PoolingHttpClientConnectionManager, in short, it makes requests via a pool of re-usable persistent connections. Re-using connections (to the same destination) is (I assume) more efficient and more performant than repeatedly tearing them down and re-establishing them. If you would like to read more about how to make use of this class, Eugen Paraschiv’s article about HttpClient Connection Management is a good read.

Dangers Outside the Cocoon

While the PoolingHttpClientConnectionManager is very cool, working with it properly (in a way that won’t leak connections) can be challenging. [click to continue reading…]

{ 4 comments }

Tidewater Glaciers - Prince William Sound

Did you know that you can use CasperJS to script, in an automated fashion, usage of your site – including clicking links and filling and submitting forms? Did you also know that, if you’ve got a site where most/all of the data is being delivered straight to the browser via Ajax-ified payloads, you can mock all of that volatile data to produce robust tests? Do you know, given that Ajax-ified site, exactly how to do data-mocking with CasperJS? If you said “no” to any of these questions, this article is for you.

[click to continue reading…]

{ 7 comments }

Nature Mimicking Life

Just like peanut butter plus jelly is a satisfying and delicious combination of two otherwise individual ingredients, CasperJS plus data-mocking is a powerful and effective pairing of two otherwise individual tools. However, whereas bringing peanut butter and jelly together in a sandwich is pretty straight-forward and requires a bare minimum of instructions, getting CasperJS and data-mocking libraries like Sinon.JS and Mockjax to play well together takes some effort. However, the awesomeness that you get when putting CasperJS and these data-mocking libraries together dwarfs the amount of information available explaining exactly how to do that. I’m going to take a stab at fixing that.

[click to continue reading…]

{ 1 comment }

Stop Eating Processed Foods

by Michael Scepaniak on September 2, 2014 in diet & exercise

Pacific coast beach near Fort Bragg

If you couldn’t exercise for six months, do you think you’d lose weight – or do you think you’d gain weight?

During the first half of this year, I had to stop doing all of my normal physical activities. I had to stop lifting weights, riding my bike, going for walks, using my standing desk, etc. This stoppage lasted for about six months. (Actually, to some degree, it is ongoing.) During that time, instead of gaining weight, I lost weight. I lost 21 lbs, to be exact. That was almost 12% of my bodyweight.

[click to continue reading…]

{ 2 comments }

Whac-A-Mole Physical Therapy, Meet Ankylosing Spondylitis

August 3, 2014

On January 1st of this year, I weighed a pleasing 178 lbs. About 45 days later, I had involuntarily lost almost 20 of them. And so began a progressively deteriorating 7 months for me.

Read the full article →

Why I Stopped Funding My IRA – The Roth, Too

June 13, 2013

Do you think you might retire early? Earlier than 59 1/2 years old? Are you putting a significant amount of your savings in a Roth IRA or Roth 401(k)? Well, that might not be a smart move. In a previous article, I explained why I’ve stopped funding my IRA. That article spurred a series of […]

Read the full article →

Why I Stopped Funding My IRA

May 21, 2013

I don’t put anything in my IRA or 401(k). Zilch. Don’t get me wrong. I save for retirement – a lot. But, out of all of the saving and investing I do these days, none of it is tax-sheltered. None of it is going to grow tax-free. And that’s a conscious choice on my part. […]

Read the full article →

Apologies For The Email Noise On Sunday

May 14, 2013

[Note: This post is addressed primarily to subscribers of my separate travel blog.] I‘m sorry. You may have received an email from me (my blog, to be exact) this past Sunday that contained 10 or so posts/articles that had nothing to do with travel or travel-planning. That was my bad. It was completely unintentional and […]

Read the full article →

Hibernate, Sybase, and the Unchained Transaction Mode Error

May 7, 2013

The other week, the following error got raised in our testing environment – against some rather new code that we deployed (into our existing Java/Hibernate/Spring-based web application running against a Sybase database): Stored procedure [procedure name] may be run only in unchained transaction mode.

Read the full article →
Member of The Internet Defense League