I'm blogging about programming, but ... hey look over there - it's something shiny!
Wednesday, December 05, 2012
Who Owns the National Debt?
Occasionally, I like to check on which foreign countries own our massive national debt. The today US federal debt is 16.3 trillion dollars. Foreign debt holders have a total of 5.5 trillion giving them the privilege to hold 33% of our IOUs.
If you listen to Jay Leno, you would think China owns the whole amount, but they clock in at only 7% of the total. And China's holding have been steadily falling, shedding 115 billion of treasuries this last year. While China is cooling to our bonds, Japan has taken up the slack and bought an additional 147 billion since last September.
My previous post in 2009 is here.
Saturday, November 17, 2012
Pictures from Keep Austin Agile 2012 Conference
Before the sessions started, I ran into an old friend of mine, Kelly, who mentioned that Agile has reached a "tipping point" with the big companies. They used to just ignore Agile, but now after hearing so many success stories, the big boys are telling their IT departments to do this Agile thing - now.
The food was amazing - great breakfast food and lunch.
A sellout crowd of 400 people attended.
David Hussman, aka, "The Dude" gave the keynote. My take of his message: Agile is like musicianship - it takes lots of practice, jamming, listening, learning, repeating.
(He also said humans have played 200,000 years of Angry Birds).
He reiterated the cost of context switching - if you're shoveling three piles of dirt around context switching is not hard; if you're juggling 3 different projects, it's very costly.
"Slack" by DeMarco was a recommended book.
Chris Weldon spoke on How to Enable Your Team to Continuously Deliver Softer.
What make Agile work?
Teams must be highly motivated and stay together. If the teams are constantly being reformed around projects, they don't have time to develop trust and learn their velocity.
Business partners must be fully engaged.
Attention to getting things done, before starting something new.
Technical excellence and quality.
What makes Agile fail?
local optimization.
Mike Cottmeyer spoke on Patters for Agile Adoption
Walter Bodwell talked about Deploying Often. I liked his talk since he was speaking from his own experience of deploying software everyday. One of the advantages of Continuous Delivery is that if you have problems one day, it's probably last night's software changes - you don't have to sort through six months of changes.
George Miranda spoke about IT Infrastructure Automation
Automation + Culture = Agility.
The natural tension between IT and Dev:
Dev's job is to add new features. IT's job is the keep the machines fast and stable.
Really both department's job is to enable the business.
My take on conferences like this: 85% of my time in sessions will be wasted. 15% will be well spent. Some of the most interesting things happen in the hallway. The boring sessions are even good because my mind wanders to my current work project and what needs to be done in the broader scope.
Tuesday, November 13, 2012
The Danger of the Digital Pierian Springs
drink deep, or taste not the Pierian spring:
there shallow draughts intoxicate the brain,
and drinking largely sobers us again.
Alexander Pope (1688 - 1744)
[The ancient Greeks believed the Pierian Springs, sacred to the nine Muses, imparted knowledge of the literature, the arts, and sciences to all who drank.]
As software developers we have to always be on guard against the latest crazes promising multiple times the efficiency of current "stone age" software development. For a while it was ObjectOriented Programming/Design, then GUI builders, then Patterns, then Functional Programming, then Service Oriented Architecture, then Software As A Service, then the Cloud, then REST and MVC. (Ruby, Interpreted languages, and Kanban are in there somewhere).
I have seen quite a few systems (and built some of my own) that were slavishly and unnaturally following a paradigm far beyond what would make sense. Do not be afraid of the new technology, some are really useful, but remember to drink deeply and see the flaws and limits of fresh intoxicating technology.
From Linus Torvalds:
Any time you have "one overriding idea", and push your idea as a superior ideology, you're going to be wrong. Microkernels had one such ideology, there have been others. It's all BS. The fact is, reality is complicated, and not amenable to the "one large idea" model of problem solving. The only way that problems get solved in real life is with a lot of hard work on getting the details right. Not by some over-arching ideology that somehow magically makes things work.
Linus quoted on SlashDot.com
Disappearing Menus in Firefox on Windows 7
Life is much better now that Casper is gone.
Monday, November 12, 2012
Apple "Jumping the Shark" with the iPhone5
Lightening to 30-pin adapter |
1. The new maps were not ready, but Apple assumed they could foist bad software on people because they are Apple and their fans would adore them for it ("Thank you sir, may I have another?").
2. The non-standard connector. This one really gets me. The whole world is moving to the micro-USB connector for cell phones for data transfer and charging. In Europe it's the law to charge with micro-USB. With the same cord that charges my wireless Logitech mouse I could connect to my phone - what a great idea! No more tangled masses of incompatible chargers and cords. But no, Apple has to Think Different(tm).
If I upgrade from my iPhone4S to an iPhone5, I'd have to get all new connectors for work and home and car, while still having the older 30pin connectors for all my other older i-devices.
It would be one thing if the new connector offered something worthwhile, but it doesn't. It's slightly smaller and it can plug-in upside down, but that's it - not nearly enough benefit to me for the hassle.
The shine is off Apple, with it's brazen move to maximize revenue while inconveniencing their customers.
I'll be looking at the Samsung Galaxy Note II for my next phone.
Friday, November 09, 2012
vs2012 "no symbols have been loaded for this document"
"no symbols have been loaded for this document".
The solution was easy, I switched the default code type from "Managed (v4.5,v4.0)" to "Managed (v3.5, v3.0, v2.0)".
(I'm not sure why vs2012 can't look and see that my project is running as .Net v3.5 and just automagically set it.)
Saturday, November 03, 2012
Differences between isql, osql, sqlcmd and Invoke-Sqlcmd
My GreatGreatGrandFather, Elijah Fincher, playing the part of "isql" |
I'm not a big database guy, so I thought I was cool a few years ago moving to osql from isql. Wrong. The cool kids are on Invoke-SqlCmd
What's the difference:
isql - the grandfather, last used in SQLServer 2000. You should only be using this if you are working for some government agency.
osql - the father, introduced in SqlServer 2000, will probably be phased out soon. Use this if you work for a large corporation like GM.
sqlcmd - new kid, introduced in SqlServer 2005, used in current SqlServer insta
lls. This is what everybody else should be using.
Invoke-SqlCmd - the new cool kid, used inside PowerShell. Use this if you are really cool and have installed linux on your old computers at home.
Example using sqlcmd:
sqlcmd -S MyServerName\SqlExpress -E -Q "CREATE DATABASE Movies" sqlcmd -S MyServerName\SqlExpress -d Movies -E -i "C:\workfiles\Movies_CreateTables.sql"
The "-E" option says to use trusted identity;
"-Q" the query to execute
"-d" the database to access
"-i" the command input file
Friday, November 02, 2012
Austin Java Users Group - RESTful Web Services
POST is to create PUT is for updates DELETE is for well, deletingRyan used the sublime editor for small things and IntelliJ for coding (he really liked IntelliJ more than Eclipse, even the community edition).
jacoco used for a code coverage tool.
"Test your source code with a more powerful language." So we used Groovy for testing.
I learned that the 201 status code is for "OK, I created an object" and by convention the objects location (identity) is passed back in a header.
Ryan liked, what .Net people call "Fluent" style, where methods can be chained together if we return the object, e.g., user.withRole("admin").expires("never")...
public User withRole(String role) { this.roles.add(role); return this; }Ryan demonstrated "JerseyTest" which was amazing.
For REST systems, instead of wsdl like SOAP used, we have a simpler format called "wadl", which is not standard at the moment.
When retrieving info from a REST server we can imply the format by appending an extension, /usr/345.xml or /usr/345.json
JerseyTest impressed me with the excellent separation of code possible. Ryan went out of his way to write all the code to be testable, and only use the meta info on the methods to describe their web behavior, so we could test their POJO behavior easily with NUnit.
He used projectlombok.org to autogenerate accessors.
"gradle distZip" created the distribution package
The most impressive part of the demo was to take our shiny new web service and seemlessly deploy to RedHat's OpenShift cloud service. His slides are here and the web service is here.
Saturday, October 13, 2012
Pictures from the Overview of Kanban - Austin SPIN Oct 11, 2012
Here's the notes I jotted down during his talk:
Multitasking is bad Why do we work on too many projects at one time? - Not focused on deliverying value - Maximizine utilization - stakeholders need to have their project "In progress" getKanban.com Little's Law Work In Progress ---------------- = Aggregate cycle Time Throughput Stop Starting and start finishing If we focus on fewer items at a time we can: 1. Increase productivitiy and deliver more 2. Get our customers more engaged 3. Have agility to adjust when changes occur 4. Lower our cycles times, less time to finish after getting a project 5. Limit the costs of delay David Anderson wrote a Kanban Book for software development 2010 How to limit WIP Throttling the input (demand) into the system Lowering the WIP highlights the bottlenecks Prioritization is no longer about ordering all the work, but picking the next one We need to optimize the whole system not just one part. Kanban Start with what you do now Agree to continuous improvement Respect the current process, roles, responsibilities Encourage acts of leadership at all levels 5 Core Properties of Kanban 1. Visualize Workflow 2. Limit WIP 3. Measure Meausre and Manage Flow 4. Make Process Policies Explicit - document what done means 5. Improve Collaboratively (Using Models/ Scientific Method) Throttle demand to meet throughput in order to gain leveled flow Shortening cycles and increasing the rate of delivery will build trust Identify the constraint in your system and focus on optimizing the whole Kanban companies here in Austin: BankVue, HomeAway, BaazarVoice Dan Pink RSA Drive video Sprint time is how long you can resist change 64% of features are never or rarely used Do we ever measure the usage of the features we delivery?
Monday, September 24, 2012
Awesome FireFox AddIn, Blank Your Monitor
Thursday, September 06, 2012
"Don't Just Do Something, Sit There!"
During a recent upgrade I panicked. We were upgrading our system to be on a Universal Time so all the countries could schedule and see events in their local time (don't get me started on daylight savings time).
Our team in India ran my upgrade script to convert all the historical records to Universal Time from the local server time, but my web application was still showing the old time, just as if the script had not run. I spoke with the person doing the SQL script execution and he assumed me he already ran it.
But our system wasn't showing the new times. This is when I panicked. Instead of carefully thinking the situation through and talking with some other knowledgeable people, I had the India team rerun the script. Then it hit me. The servers where caching the times. The database had really been updated, but the app was clever enough to cache the time to save load on the database.
I restart the web app and sure enough the historic times were now changed by twice the intended amount. After rerunning the upgrade script with a negative time to set the clock back everything was fine. The upgrade proceeded and I learned a valuable lesson,
"Don't just do something, sit there! (and think)."
Saturday, September 01, 2012
Keeping up with Tech
The advantage of dead-tree publishers is that they take the time to see what is really viable and take a little longer term view than web-only sources.
A print publisher has more at stake if a book bombs - a warehouse full of unsold books.
A few that I subscribe to:
The Pragmatic Programmer newsletters and magazines.
Mannings subscribe to Newsletter.
The Myth of the Better Alternative
The problem is, of course, we don't know who will rise to power after a bad dictator is disposed. Will the new government be better? Hopefully, but it could easily be worse. We just don't know. We can't know. Removing a dictator could result in a long, bloody civil war that kills thousands of people and literally destroys the country, only to be followed by a more evil dictator.
Czar Nicholas was not the best ruler, but I think many Russians - the 20 million killed by Stalin come to mind - would have preferred the Czar to the communists.
The United States does not need to intervene everywhere in the world that has what we consider a less than optimal government. We just can't afford it. Besides, we don't know what's best for other countries. Why don't we just save thousands of our soldier's lives, trillions of dollars and let the rest of the world work out their own problems?
Friday, August 10, 2012
Investing Tip: Be Careful of Target Funds Fees
I was excited to hear about Target funds - funds that target a specific retirement year, like 2025, and automatically move assets into more conservative investments. I thought this would be great; I wouldn't have to worry about rebalancing my retirement fund - and my financial advisor recommended it.
But what I didn't research carefully enough is the management fees. My 2025 Target fund had a fee of .74% per year and was composed of index funds in US stocks, World bonds, International stocks. If you take the weighted average of my Target fund's components, management fees were only .26%. So I was paying .48% interest, hundreds of dollars, a year for the Target fund to slowly move to a more conservative balance. For half a percent interest, I could make a few trades at the end of the year.
Some target funds are a good deal. At Vanguard my target fund is cheaper than its weighted parts.
Moral of the story: Research your target funds and make sure the management fees are not excessive. Learn from my mistake so you don't have to be the "other people".
Saturday, August 04, 2012
In Mountain Lion "invert colors" shortcut not working
Monday, July 09, 2012
Pictures from at Austin .Net Users Group, July 9, 2012
- polyglotprogrammers.org are meeting the 2nd and 4th Thursdays of the month, 6:00 - 9:00 pm to code and learn new languages here in Austin. Meeting at Headspring's new headquarters now.
- www.aspconf.net will be live screencast with big names.
- Gabriel Schenker wrote a book on NHibernate, but is using no database on his current project.
- Using CQRS with ES can be taken to the max and yield not an Object Oriented system but a Functional design.
- Look Ma, no database. In his example, data was stored as JSON objects in plain system files using Google Protocol Buffer serialization. A GUID was embedded in the filename with an object name prefix, recipe-7c9e6679-7425-40de-944b-e07fc1f90ae7.txt
- Since some files systems (cough, cough, Windows ...) get slow with over 10,000 files, the files are distributed over many directories with a hash of the filename indicating the directory.
- Gabriel's point of view is that it's simpler to write your own document store database, and Inversion of Control container than to incur the cost and overhead of using something like RavenDB if you don't need all the features.
Tuesday, July 03, 2012
Importing Cableone email into a new Gmail account
Email address is really "myemail@cableone.net", the ".net" threw me.
Pop server is "pop.gmail.com"
Port is "995", select "edit" and select "SSL".
Thursday, June 21, 2012
Pictures from Paul Hammant at Austin IEEE, June 20, 2012 "Client Side MVC"
- Lots of job openings are available in Austin.
- Developers using ClientSide Model-View-Controller frameworks are more productive.
- The original framework, backbone.js, has lots of competitors.
- Paul liked AngularJS (made by Google employees in their 20% time) for open source projects and Knockout (made by Microsofties in their off-time) for Microsoft environments.
- DoubleClick uses AngularJS for their commercial site.
- http://addyosmani.github.com/todomvc/ has demos of the ClientSide MVC frameworks.
- CSMVC allow for rapid prototyping.
- CSMVC offers massive code reduction.
- Paul thinks Knockout will be an official component in the Microsoft toolbox in the future.
- "Java and .Net developers need to get involved with JavaScript or get left behind like COBOL programmers."
- JSON is the Browser Lingua Franca now.
- JSFiddle.com offers a good tool.
Tuesday, May 29, 2012
Canoscan 8800F Scanner and Vertical Streaks
The problem image:
The solution image:
Canon email help was somewhat helpful, although they never solved the problem. To fix the vertical artifacts I had to lie to the scanner and tell it these were "Color Photos" instead of "Black and White Photos". Then everything worked fine. Must be some bug in the Black and White image processing algorithm.
Monday, May 28, 2012
Move over 1080p, 4K is on the way
The new spec comes in two flavors, 4K and 8K. 4K means the pixel count is 3,840 x 2,160 giving 8 megapixels per screen, instead of today's 1,080 x 1920 pixels which has 2 Megapixels. The 8K version packs 32 megapixels. This will be wonderful.
Already Peter Jackson and others are shooting in this new format. Get ready to re-buy all your favorite movies - again and start saving up for that new 4K screen.
But where will the madness end? I'll tell you. 576 megapixels. That's the estimated resolution of what the eye can really detect. Doing a little math for a 16x9 ration screen, [(16x)(9x) = 576Megapixels, solving for x gives us 2Megapixels] yields a screen 32Meg by 18Meg.
But, ultimately we will use individual glasses where an image is directly written to each retina by a tiny laser giving us crisp perfect 3D pictures. Yeah, lasers writing to our eye balls, creepy, but get over it - it's the future.
Wednesday, May 23, 2012
Google - u so awesome
Saturday, May 19, 2012
Google AdSense Report Thinks I'm Using an Unsupported Browser
Tuesday, May 01, 2012
HTML5 excanvas "Object doesn't support this property or method"
<!--[if lt IE 9]><script type="text/javascript" src="excanvas.compiled.js"></script><![endif]-->But when IE got to the second line below, it would die with "Object doesn't support this property or method".
var canvas = document.getElementById("mycanvas"); var context = canvas.getContext("2d");The problem was that excanvas.js had not been fully loaded, so when IE hit that line, the canvas object didn't have a "getContext()" method. This happened because I was using this to start my javascript,
$(document).ready(letsStart);The "ready()" method kicks off when all the DOM has (pretty much) loaded, but excanvas.js still wasn't loaded. The solution was to replace "$(document).ready(letsStart);" with
window.onload = letsStart;Then my canvas app started working fine with an old version of IE.
BTW, my five year old daughter made this with www.MyDoodleDot.com
Monday, April 30, 2012
Making Contact Sheets with "montage"
Being very cheap, er,..., I mean frugal, and wanting to get a bunch of small pictures printed on real photo paper that I could slice into tiny 1 inch by 1.5 inch smaller-than-wallet photos, I used the open source, free "montage" program in the ImageMagick suite of tools on windows XP to create a contact sheet with this command:
montage pencil.jpg pencil.jpg pencil.jpg pencil.jpg pencil.jpg ^ pencil.jpg pencil.jpg pencil.jpg pencil.jpg pencil.jpg pencil.jpg ^ pencil.jpg pencil.jpg pencil.jpg pencil.jpg pencil.jpg ^ -tile 4x4 -geometry +0+0 -border 0 -rotate -90 pencils.jpg(Surely there's a way to not repeat "pencil.jpg", but I was in a hurry.) The source photo, in this case "pencil.jpg", needs to be 1 inch by 1.5 inches which will reproduce 16 times on a standard 4x6 inch photo. This is great if children want to give others a small picture of themselves.
Friday, April 20, 2012
Execution of user code in the .NET Framework is disabled. Enable "clr enabled" configuration option
Execution of user code in the .NET Framework is disabled. Enable "clr enabled" configuration optionMy first thought is , "I thought the .NET Framework kinda *had* to run CLR code." Turns out the project is using .Net CLR inside the database. The error message wanted to be
Execution of user code in the .NET Framework inside the database is disabled. Execute this TSQL: "sp_configure 'clr enabled',1" and "RECONFIGURE"So to fix this run this TSQL inside the database.
sp_configure 'clr enabled',1 GO RECONFIGURE GO sp_configure 'clr enabled' -- make sure it took GO
Thursday, April 19, 2012
Pictures from Enterprise Mobile Applications with ASP.NET MVC 4 Workshop
My jumbled musings and take-aways:
- Microsoft is starting to realize we are in the 21st century and thankfully putting their MVC4 in an open format that ... gulp ... real users can see the source code and submit fixes at aspnetwebstack.codeplex.com. This is such a welcome change from the "We-are-the-smartest-people-in-the-world-and-no-one-else-could-possibly-contribute-anything-of-value-to-us." attitude.
- "Web Api" is the new term for http access to data. REST is a little too vague.
- alt-mouse.select will allow block editing in Visual Studio.
- Chrome has a handy extension, "Advanced Web Client", for playing with web services, ur, I mean "Web Apis". It allows you to enter headers like "accept: application/xml" to tell MVC4 what for to download.
- Skeleton is a good css framework for creating Responsive Web application so layout changes intelligently with changing screen size. Skeleton uses a 960 pixel area divided into 16 strips.
- Headspring has example code checked in at bitbucket.org/headspringlabs.
- Much of the Responsive Web is done with the @media query in css:
@media screen and (max-width: 524px) { #container, footer, #sidebar, #content { width: 292px; } #content article h2 {font-size: 24px;} }
- MVC4 has automatic bundling of css files, so you can declare a directory of css files and it will bundle and minimize all the css files into one file to speed delivery.
Wednesday, April 18, 2012
The URL-encoded form data is not valid
"Hey, you know that web site that's been working great for years - it's broken."
We had that experience this last week with this error:
SOURCE: System.Web LOCALPATH: ... TARGETSITE: Void FillInFormCollection()exception: System.Web.HttpException: The URL-encoded form data is not valid. ---> System.InvalidOperationException: Operation is not valid due to the current state of the object. at System.Web.HttpValueCollection.ThrowIfMaxHttpCollectionKeysExceeded() at System.Web.HttpValueCollection.FillFromEncodedBytes(Byte[] bytes, Encoding encoding) at System.Web.HttpRequest.FillInFormCollection() --- End of inner exception stack trace --- at System.Web.HttpRequest.FillInFormCollection() at System.Web.HttpRequest.get_Form() at System.Web.HttpRequest.get_HasForm() at System.Web.UI.Page.GetCollectionBasedOnMethod(Boolean dontReturnNull) at System.Web.UI.Page.DeterminePostBackMode() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)To prevent malicious attacks against asp.net sites, Microsoft in the patches for Bulletin MS11-100 limits the number of name-value pairs to 1000.
To increase this number you need to add this key to the website's web.config or to the machine.config(s) on your servers:
<add key="aspnet:MaxHttpCollectionKeys" value="3000" />
Monday, April 16, 2012
Reducing the size of Sql Server log files
A quarter of my precious SSD disk space on my dev laptop was in database log files, the *.ldf files in C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA.
Since I'm not a Sql Server expert, I googled and stackoverflowed and patched together the minimum statement I needed to rid me of these tenacious ldf files.
Do not use these on production machines. Use only on development boxes where you are testing and really don't care about the database. This statement took the log size of my typical database from 15Gig to 30K.
DBCC SHRINKDATABASE ([MyDatabaseName], 10, TRUNCATEONLY)
Friday, March 09, 2012
Photos from Agile Austin March 6, 2012
In the demonstration we had two teams with processing plants scattered throughout the world, or the room in our case. A runner had to move Lego pieces in batches between plants where the Legos were processed for 4, 7, or 10 seconds.
The game emphasized the lean principles of no overproduction and continuous flow. Bob showed a surprisingly simple solution at the end.
Afterwards I had a chance to talk with Bob and asked him what mistakes he sees most often with software companies. He said most software companies spend too much time upfront in requirements gathering and design, and not enough in simple prototypes and discussions with the users.