Wednesday, February 08, 2017

How to format a json file in Emacs with manual install

Today I needed to reformat a ginormous json file, but could not use the package-manager instructions for Emacs at fire-wall/network issues.

So I manually installed all the needed files and put this in my .emacs file:

(require 'json-snatcher) ;from
(require 'json-reformat) ;from
(require 'json-mode) ;from;

 Then to format a file, select all (c-x h) then  m-x  json-reformat-region.  Works like a charm.

Thanks to the contributors for creating these packages!

Tuesday, January 24, 2017

Agile Austin "Prepare Your Software Development for 2020" by Israel Gat

Israel Gat (@agile_exec) presented to sixty people at Agile Austin at Kasasa about the future of software development.

Israel Gat

"I love software."

Big ideal:  Automated Insight Generation through Analytics processes is starting to trump the Software Development process in terms of value generation.

Instead of Hierarchical Value Generation/Value Flow, we need to do horizontal flow.

People are starting to get rid of middle person between human knowledge and data scientist and replace with Insightful Applications/Machine Learning.

A computer that used machine learning reached Israeli Master level in chess in 3 days.

Two Primary Drivers of Contemporary Software
1. Internet of Things
2. Machine Learning

The only way to cope with vast amounts of data from IoT is machine learning.

Four Messages:
1.  Foundation of software is value generation
2. Current software methodologies and frameworks will need to change in 2020
3. End State (2025? 2030?) is to have machine learning do 70% of value generation process.
4.  By 2018 will face a shortage of people with deep analytical skills to extract insights from collected data.  We will need 1.5 million managers who have the quantitative skills to make decisions based on analytical data.

What to do when data quality is bad?
How to manage poor software quality in data analytics?
What will happen to all the people replaced by analytics?

What is Insight Generation?
Insight generation is the identification of novel, interesting, plausible, and understandable relations among element of a data set that
a) need to formulate action plan
b) it results in an improvement as measured by KPIs.

Case for Automated Insight Generation:
1. The amount of data is so huge, humans can't process it
2. We don't know how to really analyze and utilize Big Data
3. Time to decision is decreasing while data velocity is increasing - we don't have time to process anymore

What to do?
Don't let today's method/process/framework debates absorb all you attention cycles
Start in-house training programs in IoT and Machine Learning
Young kids want bleeding-edge projects

Monday, January 09, 2017

Austin .Net User's Group: Distributed Systems 101 by Colin Pear

Colin Pear from ClearMeasure (@colinpear) presented to this month's Austin .Net User's Group on Distributed Systems.  Here's a few pics:

My random notes:

Eric Brewer Cap Theory
Michael Perry Video)

Distributed Processing 
Pick any two:
1. Available
2. Consistent
3. Partition Tolerant

8 Fallacies of Distributed Computing by Peter Deutsch
The Network is reliable
Latency is zero
Bandwidth is infinite
The network is secure
The topology doesn't change
There is only one Administrator
Transport cost is zero
The network is homogeneous

Free book:

Distributed systems are complex
It's a paradign shift
Communication is the key

Smart endpoints, dumb pipes, distributed routing

Types of Coupling:
Spatial - physical links
Platform - Can a Java app talk to .Net? 
Temporal - time based

Going distributed solves problems, but it's more complex and requires different thinking.

NServiceBus does heavy lifting.  It's not free, but Colin thinks it's well worth it.  $25 or $30 bucks per machine per month.

NServiceBus can use AzureServiceBus, RabbitMQ, MSQueue, or SqlServer.

course by Udi Dahan:

Thursday, January 05, 2017

Web Development Things I Learned Recently

What's the difference between a "rem" and an "em" in css?
Both set the font-size based on ancestors, but "rem" always looks at the top root element, while "em" starts looking upward through its parents to find the first one with a font-size defined.

When removing an "href" in an anchor tag (and using the 'click' attribute instead) how to make the cursor look like it's over a link:

a.myClass { cursor: pointer; }

How to stop iOS from making input elements have rounded corners that look like a button:

#MyInputId {
    border-radius: 0;

How to pass arguments to a jQuery click function:
 In a Razor page I assign event data from our ViewBag to variables to be passed to "myFunction":
  $('#myButton').click({ size: "@ViewBag.size", colour: "@ViewBag.colour" }, myFunction);

In the receiving function the variables are in the event's data object:
 function myFunction(event) {
    var size=;
    var colour=;

How to trigger a form submit from JavaScript in .Net MVC:


How to make a banner stay at the bottom of the screen:

.myClass {
    position: fixed;
    bottom: 10px;
    z-index: 100;
    min-height: 100px;

How to use media queries for responsive design:

in variables.less:
@screen-sm-min:              768px;

in regular less file:
 .close-button, .close {
opacity: 1.0;
margin-top: 27px;
margin-right: 40px;

To force Visual Studio to warn you about Razor page errors during compilation, have it pre-compile those pages:
1.  Right-click on the Project and select "Unload Project".
2.  Right-click and select "Edit *.csproj"
3.  In the csproj file set MvcBuildViews to true:
4.  Right-click and select "Reload Project".

To search all files with names matching "*.shtml" and replace "" with ""
 find -type f -name "*.shtml" -exec sed -i "s/http:\/\/\/\/" {} \;

How to get rid of some network calls in the Chrome debugger?
In the Chrome debugger, under "Network" you can exclude calls with a particular string by prefacing it with a "-".  For example, to get rid of all calls with "transport", do this:

Thursday, December 01, 2016 not working with Backbone

 Don't we all love JS Bin?  Yes!
But to get backbone to work takes a little extra.
Using the default libraries I get this error:

"Script error. (line 0)"

But if you replace JSBin's imported javascript libraries:

<script src="//"></script>
<script src=""></script>

with these in the head element:

<script src=""></script>
<script src=""></script>
<script src=""></script>
<script src="//"></script>

JSBin works like a charm.

Wednesday, November 09, 2016

Software Estimation with Hours or Story Points in Scrum (aka the Eight Bloodsucking Ticks of Estimation)

Should you estimate with hours or Story Points when starting a scrum?

I've done both here in the great state of Texas and here's my thoughts:

Starting out I always liked hours.  Hours are comfortable, you can understand them, and they are  simple.  How many hours to make that widget?  Seven.  Easy.   You can touch hours, look them up in the dictionary, and explain to your boss what an hour is.  But "hours" have a dark side.

At the beginning of a sprint, we estimated we could work 6 hours a day,  with 2 hours for email and meetings.  How many stories can we put in a sprint?  Well, we've got two weeks, that's six hours times 10 days equals 60 hours of work per developer.

But our estimates were always way low for the work, about half of what they should be.  Frustration mounted as we missed features due to poor estimations.   Slowly, like a rattler sneaking up on a rat,  I realized the problems with estimating in hours.

When estimating hours we miss these eight bloodsucking ticks:

1.  Additional parts of the task we didn't think about.

2.  Some tasks are harder than we thought.

3.  Task Interruptions.  "Hey, I know you are in the middle of a scrum, but production has this huge problem and the big boss says to drop everything and fix it now."

4.  Unexpected tool problems.  At the most inopportune time, your drive will crash, Visual Studio will get corrupted, and the new guy will demolish the entire Git repository.

5.  Too many meetings.

6.  Developers are natural optimists.  "I really can do that in seven hours."

7. Pride.  You don't want to look bad in front of the ScrumMaster (tm)  and other developers, so you estimate low hours.

8. No time for bug fixes.  QA will find bad code, but we don't estimate time for it.

After seeing hours not working well we switched to story points.  How much is a story point worth?  We started with a rough guess of half a day.  (I know story points are suppose to be complexity, but, ... yeah, whatever, we started with two a day).

After a few sprints we got our velocity - about one story point a day - and it worked well.

The magic of story points is that they subsume the 8 Bloodsucking Ticks of Estimation into them.

Tuesday, November 08, 2016

Tips on Selecting the Lowest Electricity Rates in Texas Using

 Looking for the cheapest electric rates in Texas?  The shocking truth is that it's not easy.
Start by visiting

This will list the "cheapest" plans, but it's not quite that simple.  Companies have hidden costs, like a surcharge if you don't use 1,000 Kilowatt-Hours in a month so you just can't get the lowest price per KWH.

Here's a simple three step strategy for finding the best price for you.

Step 1:  Find out how much electricity you used each month for the last year.
You can find this by looking at your old bills, or, if you have a smartmeter, visit .

Here's my chart from from last year:
And the details

Step 2:  Get the average for the months in these bands:  below 500, 500-1000, 1000-2000, above 2000 KWHs.
I had 9 months between 500 and 1000 KWH with an average of 570 KWH, and 3 months above with an average of 1,100 KWH.

Step 3:  Call the companies with a rating of four and five stars that seem to have the best rates from and ask them to tell you how exactly much a month with your average usage in those bands would be.

(Make sure their numbers include everything except taxes.  Two reps on different days from one company quoted me just the "electric charge", and neglected the $9.99 penalty for not reaching 1,000 KWH in a month until I asked if it included that charge.)

 Then multiple those monthly rates times the number of months in that band to get your yearly cost.

 Here's my spreadsheet.  I had 9 months below 1,000 KWH and 3 above.

Months below
1000 kwh
Months above
1000 kwh

93Annual Cost

Average KWH5701,100

CompanyPhone NumberPlan Name

Green Mountain(844) 854-2260Pollution Free Conserve 12 Choice$38.00$67.00$543.00

Discount Power(866) 584-7776Saver 12$45.16$85.00$661.44

Reliant(855) 350-8650Reliant Conservation (SM) 12 plan$45.24$83.77$658.47

Power Express877) 400-0232Sustainable 12$61.00$111.15$882.45

Apt 18$43.00$112.34$724.02

Source Power and Gas(888) 557-0065

TXU(855) 847-6135Discount Texas Choice (12)$75.00$130.00$1,065.00

Smart Discount for 12 months$65.00$86.00$843.00

Mid America(800) 342-3346

Ambit(877) 282-6248Texas select 6 month term$52.85$82.72$723.81

Lone Star Select 6 month$51.14$79.42$698.52

For my usage patterns the best offer I found was from

Step 4: Have someone else do the heavy lifting.  A few options:

A.  Spreadsheet at .  It only works in Excel, and I use a Mac, so I cannot verify if it works, but it does look promising.

B. will tell you the cheapest plan based on their algorithms.  The cost is $35, but can easily save you that money.

C. will also calculate your best plan.  It's free for a while and they will charge money soon.  It's a beautiful website with wonderful graphics and an easy to follow process to get your best rate.
Here's a pic of my results:

Additional notes:
1.  At the web site you can get the exact formula the company uses for the different plans.  I tried to calculated what the customer rep should quote me before calling.

2.  It appears every company in the OnCor  region has to pay OnCor $5.25 base plus
-->$0.036384 per KWH.  Many companies charge a rate for electricity in the different bands, e.g., 7.5 cents for each KWH below 1,000 and 9.2 cents for above 1,000 KWH plus a base charge plus the OnCor charges.Other companies have a "bundled rate" and they roll the OnCor charges into a higher per KWH rate.

3. A good article about the process is at 

Good luck!

Let me know if you find additional helps in picking providers.  I've thought about making a web site to roll all this up into a simple grid.  Would that be helpful to you?

[Update:  As it turns out my cheapest plan was from Gexa Energy, which both and found, but I did not research.  I would have saved about $80 a year if I'd used their advice.]