Peru is burning a hole in its pocket

A girl I know is out shopping for a new TV with her mom right this very moment. The mother recently “came into a bit of money” as they say and she’s been keen to splurge on some nice things for herself and her family. Fair enough, particularly because the mom happens to be a retired schoolteacher who in years past certainly didn’t have all the luxuries I’ve enjoyed throughout my life.

In macro context the picture is a bit more complicated. Consumer spending and consumer credit in Peru are growing rapidly even while the economy as a whole has been slowing. If you think that might be a risky combination, I suspect you belong to a dwindling group of people who possess what was once known as common sense.

Peru’s economy and foreign currency inflows are heavily dependent on mining but there are relatively few “slam dunk” mining projects in the near future pipeline. Forget what the stuffed suits in Lima might say, I’ve talked to quite a few out-of-work mining engineers here in Cusco who are moonlighting as taxi drivers until they get called up for their next project and from what I hear, the pipeline is not particularly hot.

There’s probably a defensible argument to be made that if there is a bubble, we’re still in the early stages. If you feel like you can time these sorts of things and can stomach the risk, there’s still time for money to be made if you invest in the right places and get out at the right time.

However, I’m not interested in investing or buying stuff. I have 3 kids that for the moment are still growing up in Peru and I’m interested in the things that affect a deeper quality of life, the stuff that really matters beyond consumer goods. I’d like to see nicer parks, better hospitals, better schools, safer roads. I’d like to breathe cleaner air and have less potholes too. I wish there were much better residential neighborhoods, zoning, urban planning. A lick of paint wouldn’t hurt 95% of homes in Cusco. Speaking of homes, I wish there existed an acceptable system of recording titles and ownership in Peru so fools like me who pay taxes can actually take out a mortgage. I wish there were a sound financial system so people who carry around wads of cash are held accountable for the way they made those riches and if legitimately earned, pay a small slice of taxes so that all of the foregoing is actually possible, presuming there were a non-corrupt and competent public sector.

It’s a shame that all of the macro economic growth that Peru has enjoyed in the past 2 decades has only generated consumption and done little or nothing to affect true quality of life. Surely this isn’t a unique Peru problem but now that the economy is slowing down it will be interesting to see how the powers that be choose to address the challenge, more trickle down economics or make the hard decision to pursue real reform in the public sector, judiciary, the financial system, education, etc?

Everything that is wrong with Peru in a single headline

F09A14F6-B295-4DE1-A0EF-213E4B39BE92

The newspaper is at least a couple of weeks old. I only buy the paper to put on the floor of the bird cages so our budgerigars will rightly and justifiably be pooping on a headline that reads “More than 1,500 mayors will meet in Lima during 4 days”. If you care to read the blurb below the headline, it was essentially a meeting for the incoming politicos elected in last fall’s local elections on how to be a good mayor, hosted by the powers that be in Lima.

Now you could argue that only Lima has the facilities to host such an event and that most of the incoming politicos are badly lacking in qualifications for the job they are about to take on but I would counter that sometimes setting the tone is more important than the details and in this case, the message should be loud and clear that the powers that be in Lima need to get out and work for all of Peru, not the other way around.

The risk in saving the world – General Electric edition (GE)

A guy I know writes software for energy rebates and building codes. It’s great world-saving type stuff, at one point there was even a feature that showed you how many trees you had to plant to offset the carbon footprint of your new AC unit. The more high-end your new machine, the lower your carbon footprint. He makes an awful lot of money to write this software for big companies and works long hours. From time to time he sits down with a couple of gin and tonics at night to work on his software and doesn’t have time to read his kids a story. “Tomorrow” he’ll tell them.

His wife likes to watch the morning news on the TV. She talks to the TV and has answers for all the problems in the world. Alan Garcia, Keiko Fujimori, Maduro, Trump, no problem in the world goes unsolved except breakfast for her kids, usually she leaves that to the maid.

When I recently shared some thoughts on the current situation at GE with a few of my former co-workers there, here’s what one of them responded:

I don’t blame Jack Welch for ruining the company, that’s not giving Immelt the credit that he deserves for what he steadily did for 16 years. Sure, the accounting was flawed back but at least Neutron Jack held people to some level of accountability. People got fired when they messed up. Immelt, and for that matter the whole corporate gang, was more concerned about looking good in the press; making sure we are known for our “diversity”, “equal opportunity”, LGBTA and how GE single handedly saves the world….bla, bla. He made very bad business predictions and based his spending and acquisitions on those. He gambled with $30 bil of the pension fund and lost. He should have been locked up, but instead he got a fat $211 mil retirement check.

People will debate Welch and Immelt and write books about GE. I suppose only the “corporate gang” as my friend describes them truly knows their motives. Were they liberal progressives at heart, did they enjoy the media attention, was it easier to talk about LGTBA rights than the corporate balance sheet, or did they think pushing a liberal agenda was good for sales of windmills, ECM motors and expensive light bulbs? Whatever the motive, they sure didn’t take care of their own house while they were busy saving the world.

One thing is for sure: be leery of any large organization – for profit or not – that peddles their “saving the world” ideologies while moving millions of dollars.

New Year’s missive for the General

Every year a few old friends from my previous job at GE are so kind as to check in around the holidays, exchange best wishes and such. Naturally there’s always some catching up on the latest happenings at what was once one of the most respected companies in the world. One of my friends wrote “I’m sure you’ve heard about the General in the news. Nothing good coming from there for over a year now”.

Here’s what I responded:

… I actually quit reading any and all news some time ago because I just got tired of reading how the world is coming to an end and everything is the fault of middle-age white men. Having said that I did know that GE is in bad shape. They’ve actually been in bad shape for a long time, were it not for the government bailout GE would have been bankrupt in 2008. I felt bad at the time I was there (believe it or not) for being so critical of the company and some of its management but I always felt that GE’s corporate culture was horrible. At least in the aviation business you guys are doing well because you’re building good products that the market needs but the people most responsible for its success (ie. the technical people) were always the ones with the least career opportunities whereas the ones that just look and sound good but couldn’t tell which pointy end of the airplane goes down the runway first were the ones with better career opportunities. Long story short it’s not beyond the realm of possibilities that GE files Chapter 11 at some point (most likely a controlled type bankruptcy a la GM) which would wipe out the retail shareholders and significantly hit the “fixed” pensions of (ex-)employees like us. Jack Welch was really the bad guy here, with all his “financial engineering” he destroyed GE. Immelt was just too dumb or too timid to do anything about it, he only kicked the can further down the road and then made it significantly worse with some of his decisions. I mean, if you’re not fluent in French, you don’t launch head-first into the French corporate world. Here’s a guy flying around the world on a fleet of corporate jets, pulling in 8 (or 9?) figure paychecks, being a “jobs” advisor to the US Prez but he doesn’t know what anybody in a French cafe could tell you over 3 beers?! You could probably argue some of it was criminal, GE’s “financial engineering” clearly pushing the limits of acceptable accounting practices. Now you guys in aviation are like the spouse working a 9-5 job who just found out their ex ran up a $2M bill at a Vegas casino (in your name, while legally married, etc etc). I’m not saying they’re definitely going into Chapter 11 but you can’t rule it out either. Job-wise you guys should be safe but it does piss me off to think I might lose part of my pension while the schmucks responsible for the disaster got away with a fortune.

Anyway, don’t let it get to you. Here’s some pictures of the kids, would have you thinking that I lead a stress-free life with 3 well behaved kids. Entirely misleading to be sure.

https://www.icloud.com/sharedalbum/#B125oqs3q8sdOWe

Another New Year’s resolution bites the dust

Happy New Year! Same resolutions as always: fuss less and move to Canada or Australia. How’s that going you ask? Let’s just say I was doing good until I took my kids to the park yesterday morning.

You see, I shouldn’t fuss. I do realize how very blessed and privileged I am to have 3 healthy and happy kids, a wonderful wife and a job that allows me to live a very comfortable life. Only, I’m not the easiest person to get along with and every day I get up with the intent to fuss less than the day before. Fuss less is my go-to New Years resolution.

Then I went to our local park on Jan 2. It’s a piece of junk by any standard, worn out, dirty, typical Peruvian implements made out of heavy steel, dangerous for kids to play without supervision, etc etc. But it’s the best we have so I try not to fuss. Until the park attendant came out of her “office” like she does 4 times a day to yell at the kids because the 5 year olds are playing on the swings that are only up to 3 year old. I told her something about bird poop on the swings and paying taxes and what not.

Oh well, I still have 362 days to move to Canada or Australia.

REST APIs explained with Peruvian history, culture, and my inlaws

How often have you accomplished something really worthwhile all by yourself, in a complete vacuum? You did something good without any help or advice from anybody, no information, materials or services from any outside sources? Perhaps you have but most of the time when we accomplish something worthwhile it isn’t in a complete vacuum but rather with help, inspiration or information from outside sources.

Web applications are much the same: most web applications nowadays aren’t stand alone, siloed applications anymore but share information with other computer systems. Web applications can source news, weather, maps, feedback widgets and many more from other computer systems and similarly provide their own information to outside systems.

REST API is a bit of a buzzword nowadays in programming but essentially it’s an architectural style of programming to allow independent computer systems to communicate with each other. For many developers the nuts and bolts are actually easier to understand than the concept and this past week I found myself at the office explaining the concept of REST APIs using Peruvian history, culture, and my inlaws. Listen in!

Let’s say Bloomie got tired of mellow and decided to run some IKN content. And the Economist, Otto’s alma mater and a handful of his blogging buddies all wanted to run IKN content as well. Prior approval and a small nominal fee. Otto decides to make the following content available to other computer systems:

  • Top three most visited IKN posts
  • Chart of the day
  • Friday OT

The programmer bloke sets up a new URL at api.incakolanews.com which is essentially the home page of the machine readable version of IKN. The output of this URL is not human-readable, it’s some machine-readable format like JSON. Asi:

{ “links”: [
{ “href”: “api.incakolanews.com/top-3-visited-posts”,
“rel”: “Top three most visited IKN posts” },
{ “href”: “api.incakolanews.com/chart-of-the-day”,
“rel”: “Chart of the day” },
{ “href”: “api.incakolanews.com/friday-ot”,
“rel”: “Friday OT” }
]
}

All that jibberish just means that the machine readable home page of IKN has no content other than 3 links to the specific sections Otto makes available to client computer systems.

But you wanted to hear about my inlaws, and Peru, no?

Once upon a time there were big land owners in Peru, you can still see the abandoned mansions around the Peruvian countryside. Under the military government of Velasco in the late 1960s land owners were expropriated. Then followed a collapse of the agricultural economy and massive migration to the cities. Among the land owners who were expropriated were my wife’s family. They weren’t big land owners or wealthy by today’s standards but they were land owners nonetheless. Today divisions remain in Peru, not just between rich and poor but who you are, where you come from, the part of town you live in, often determines how you live more than your personal economy does.

Better if Mamacita Linda doesn’t hear about this but it’s possible every now and then I might have vented at the office about my inlaws, how supremely spoiled some of them are. Not in terms of material possessions but rather “I’ll be attended, any time all the time”. I know that sounds terribly harsh but maybe they were just a product of their environment. Maybe they still hold a grudge over the expropriations, on some level I could understand.

Back to the REST API. APIs are big money, not the kind of “can I write some sponsored content on your blog and pay you $0.35 for every 2 million clicks” kind of money. APIs provide your core content or functionality to other computer systems, so if your content or functionality has value, your API is worth a lot of money. The overriding concern then in programming an API is to make life easy on your client applications. The easier your API is to consume, the happier your clients will be.

If I had to write the fictional IKN API, the only code Bloomie and all of Otto’s other clients would need is this:

<!— IKN JS library — >
<!— script source here — >
<!— Load and render content from IKN REST API — >
var IKNcontainer = document.getElementById( the DOM element where we want to show IKN content );
IKN.load(IKNContainer);

Five lines of code, give or take. Of course there’s a lot of work on the IKN side to make this possible but on the client side 5 lines of code should be all that’s needed to present the information to the end user and allow the end user to navigate through the content provided by the API.

The other day some of our developers were working on code for the next phase of the CoolCalc applications and a whole bunch of code was in the process of being written for client applications. I struggled to explain the REST API concept for a moment. You see where this is going.

“Think of the client applications like my wife’s aunt so-and-so!”

Not to generalize but it isn’t sarcasm or an exaggeration to say some children of expropriated Peruvian land owners don’t know how to cook a hard boiled egg. They don’t want to know how to cook a hard boiled egg. Obviously – in their mind – the hard boiled egg should be served for them. Once I’m done you can clean the table.

A REST API should be designed as if the client applications are those types of Peruvian inlaws. Our developers are from all types of backgrounds but every one of them understood 😉

IMG_3673

Abandoned hacienda of expropriated Peruvian land owners, near Paruro.

I have bad news for you

Did you know only sexy people read this blog? Sure you did! Other than that we get a pretty good mix but for all you sexy people who aren’t 3×7 anymore I’ve got some bad news:

I just heard Avril Lavigne on the radio. On the classic rock station.

Avril Lavigne
Classic rock.

If you’re like me, you’re older than you feel 😖