The lying game

You see, if you lie often enough, like dozens of times everyday, then you can make it look like the “other side” is always lying and then you can get away with lying all the time because hey you’re just playing the lying game. You can convince people that you’re actually telling the truth this way, or at the very least that the truth doesn’t really matter, only winning the lying game matters.

Everything is farming

You’re either planting, growing or harvesting each day. Sometimes what’s been planted never grows, sometimes you miss out on harvesting on time and it dies on the vine. The key is realizing which one you’re doing, about to do, or could do.

A few things I’ve learned in 18 years of software development

1 – If you’re going to start something, you have to finish it.

Seems obvious, but managing a project has a typical “long tail” and often ideas are not implemented even though there is significant planning and meeting. “Work” is started from the management perspective, but as the new functionality or change is not implemented (due to the various spikes that inevitably arise) many times it simply dies out. When you’re fixing or writing new code however, leaving something unfinished or for later means leaving the stream of consciousness that you had while working on it, making it harder to resume work. Often this leads to unstable or unusable code or at the very least adding to the pile of technical debt.

2 – Bugs are inevitable. Test early and often to know about them.

Yes people say it all the time, “there will always be a few bugs” so the key is to know what they are and be comfortable with them. Discovering a bug after go-live has high visibility, everyone is wondering how did that bug get there? Didn’t they think this would happen? In most cases (I cant think of any where this is not true) you’ll want to have anticipated the issue and planned for it. There will always be a new version.

3 – Limit the number of possible code execution paths and dependencies.

This isn’t just for performance and scalability of the application, its for YOUR performance and scalability while working on it. As a developer, you have at any one time several things to remember – the function that is receiving the callback, the function parameters needed for the query, the loop count inside a closure, etc. Make it easier on yourself and compartmentalize as much as you can. You’re not less of a good developer or “smart” because the code you write is simple – quite the opposite, it means you can write more code that does more things – which is what most people think good developers are good at.

4 – Estimation, the black art.

Having been both a product manager and a developer, I can honestly say estimation of work  is a real pain. As a PM I was generally cautious about estimates I was given for a determined outcome. As a PM I was generally apprehensive about giving estimates based on estimates I had been given, and would more often go with my gut. But what if you have no “gut” because you have no experience with the product and its development?

This is the same when you’re a developer. Now I know I know, not all developers, but many. You simply can’t ALWAYS tell the truth because “I dont know” isn’t good enough. The problem then is when you DO know the truth, and have to wonder if the PM/BA/QA/CTO is now believing you.

Don’t let it become a game of “hide the pea” – be 100% honest on every single estimate and when you don’t know you let them know you’ll have to find out more. That goes for everyone in the organization, and it is a property of company culture that must come down from C-Level execs. Trust each other and don’t fudge.

Google Sheets App Script code for CryptoCurrency price tracking #Javascript

I do a lot of crypto currency trading on Bittrex.com and I made a Google Sheet to help me keep track of my return on investment on each of the currencies in my portfolio, as well as an overall ROI for my entire portfolio.

Both Bittrex.com and Coinmarketcap.com provide free public API’s that will return current prices, market cap, volume, and other useful information.  Free to use and you do not need to provide authentication.

With Google Sheets you can add your own scripts to execute and return values you can use in a worksheet calculation. Just like how you would enter “=SUM(A1:A5)” in a cell to add the values of cells A1 – A5, you enter the name of your custom function.


To enable scripts for your Google Sheet, open a sheet then click Tools > Script Editor…

This will open a new window with a basic environment for you to write your custom functions. The language is Javascript and there are loads of fun things you can do.

Heres a code snippet for Google Sheets App Scripts you can use to get the last price of a cryptocurrency, convert to USD, and display the result in a cell.

function updateBittrex(crypto) {
var btc = UrlFetchApp.fetch("https://bittrex.com/api/v1.1/public/getticker?market=BTC-" + crypto);
var j1=JSON.parse(btc.getContentText());
var btctousd = this.btctousd();
var con = btctousd * j1.result.Last;
return con;
}

function btctousd() {
var converted = UrlFetchApp.fetch("https://api.coinmarketcap.com/v1/ticker/bitcoin/?convert=USD");
var json1 = JSON.parse(converted.getContentText());
return json1[0].price_usd;
}

The Bittrex.com API returns values in BTC, so if you use USD as your Fiat currency as I do, its helpful to convert it into USD for easier reference.

In order to use the custom functions you have to authorize your add-on to run in your Google Sheet. From within the Script Editor, click Run > Test as add-on. Next in the Configure New Test, choose – Test with Latest Code, and under Installation Config choose, “Installed and Enabled”. Then click the Select Doc button and choose your Worksheet. Click save and you should see this. Click the radio button for the doc and click Test.

Now when you’re in a cell and wish to retrieve the last price for Monero, for instance, simply enter “=updateBittrex(“XMR”)” and the script will get the last price for Monero, get the last price for a Bitcoin in USD, and return the last price for Monero in USD.

Heres an example using Ethereum. The column $ per coin has the value “=updateBittrex(“ETH”)” in it.

3 ways to program

There are three ways you can write code to output what you want given some input, and here are some characteristics of each.

1. The “Easy” Way – this is generally the fewest lines of code, the shortest execution time, uses the most native functions available and is easiest to read

2. The “Hard” Way – the code is lengthy, needs a lot of code comments, is difficult to test and feels like its forced to get the correct result.

3. The “Wrong” Way – characteristics of either #1 or #2, and it throws an error.

The challenge is then finding the way from #2 to #1.

Why I mine crypto currency

I started mining cryptocurrency on August 26th 2017. My first rig was a purchase from a friend of mine, looking to get out because the rig was noisy, generated a lot of heat and he wasn’t interested in having it running 24/7/365. Can’t say I blame him.

But then why would I buy it from him? It wasn’t for the used hardware discount, it wasn’t because I thought I could make millions in a month or a year (I knew better of course) it was because for me cryptomining was the perfect confluence of two things I love, working with computer hardware and a vision of a disruptive monetary system that may finally provide greater global economic equality.



It’s easy to get preachy about the (potential) benefits a medium of trade that is NOT based in any country, language, government, standing army, law, creed, or religion could provide. The distribution of crypto-currencies by their nature cannot be owned or dictated by any group or individual, and literally any person on planet Earth can gather up the necessary resources to essentially ‘print money’. Yes there is the initial investment of a few hundred USD(or 0.00001 BTC at the moment), yes there is the knowledge and expertise required, and yes mining requires a LOT of electricity. But you can do this anywhere. You don’t have to convince a land owner or park board they should let you roll your heavy equipment into the pristine wilderness so you can disrupt a beautiful stream turning over millions of tiny rocks looking for the shiny one. You don’t have to even own any land or property at all. You don’t have to be rich, violent, or elite. You, yes you anonymous person browsing internet, can print money.

A crypto transaction does not require any third party. No middlemen, no bank, no government just two people with their own wallet address and a high strength password to lock it. I can send you $10 in Bitcoin and literally no one else would know about it, unless they knew my and your wallet address. Oh, here’s one of my bitcoin wallet addresses if you want to send me some. 32TrweJNrYbSsMJPcjczxDRpEUPyz13Drb

Good luck guessing someones wallet address by the way. It has been estimated that the number of possible wallet addresses is equal to the total number of grains of sand on planet Earth if each grain of sand was another planet Earth with as many grains of sand. But each transaction on the Bitcoin blockchain is FULLY visible and public, so there is transparency built in. Right now you can see how much Bitcoin someone has in their wallet and the transactions that have used that wallet.
Continue reading Why I mine crypto currency

Burned 1000 calories in an hour yesterday, because there was no way I could do it.

6.2 flat treadmill miles took 64 minutes, didn’t stop running until 50 minutes and only because my sock had bunched up inside my shoe and I was worried about getting a blister. Around minute 30 my left leg started tingling like it was falling asleep. I’ll chalk that up to circulatory system fatigue.

I never thought I’d be able to finish. Well, I should say I anticipated forcing myself to finish, but somewhere in my mind was this voice saying “he probably won’t be able to do it, and that’s ok” But this voice only made me want to finish even more. I hate that condescending voice. I imagine its a nice looking gentle talking woman, and shes talking about me to someone else IN FRONT of me. That special kind of “don’t say it to his face, but he’s not really a star, he’s just what we have to work with for now”… voice.

I’ve got this panel of experts in my head that determine whether or not I should try and run another minute. “At minute 15, let’s go to 16 and then we’ll stop” they say before retreating back into their conference room full of monitoring equipment and charts. They are the board, the planners, the strategizers that come out every once in awhile and tell the bridge officers and engineers responsible for controlling all bodily functions to run at this speed for this long. These bridge officers and engineers trust them and do whatever they say. They in turn promise to report any and all abnormalities which is always just pain and suffering and yelling “we need to stop – soon!” They also place orders for inspirational music and to inject adrenaline to kick it into high gear, ignore knee and hip pain. They also keep watch on other runners at the Y who are so obviously competing with me (they aren’t). I just watch the whole thing unfold while I continue to make the same motions with my legs and arms. Sometimes I turn the whole thing off and just stop running and walk instead. Usually its because my stomach hurts or I don’t have the inspiration to keep beating my feet. I’ll never take for granted what it’s like to run while in pain, and I headshakingly think about all those endearing historical figures I’ve read about who have.

When you’re trying to get in shape you do crazy stupid insane things like running without stopping for 50+ minutes. Who does that? Not me. Which is precisely why I had to at least try it. If I failed, so what, try it again later I guess – or don’t, it doesn’t matter. Die and restart the mission from the last time you saved like a video game.  If you fail to run as fast or as far as you were trying to, you don’t really die and because you at least tried to make it, you’re that much further along when you try again. Amazingly this is how getting in shape works. You have to keep pushing yourself, but you get to keep what you accomplished. This concept was hardly established whenever I had thought about exercising to get in shape.  I figured each and every time I could force myself to exercise it would be just as painful, depressing and difficult as the first time. Boy was I wrong. It gets easier until you choose to make it harder, but it’s not hard just because you’re exercising. Of course, if you don’t exercise at least once every 2-3 days, your accomplishments turn to a fine powdery sand and simply disappear.

A lot of people get in shape after a mid life crisis or a big event in their lives like, ahem, getting divorced after being married for 13 years. For me, it was a lot of things. I can’t say for certain I had (am having?) a midlife crisis, because I don’t like to minimize or commonly categorize the effort and brutal hard work I’m voluntarily putting into getting in shape. Why couldn’t I be the one who wasn’t fat, and could run 5k and 10k marathons? Why not me? Is that a midlife crisis? I don’t care.

For many, getting divorced means changing their lives entirely. So while this upside down world is taking shape, why not lose 30 pounds? I in fact initially went the opposite direction. I took on some pretty self-destructive habits like smoking and drinking (more than normal) for the sole purpose of showing myself I can a) do whatever I want, whenever I want and b) am tough enough to do drink all that, and smoke all those and not die or get sick, and I didn’t but I was certainly very sad and depressed.

A weight loss competition inspired me to just at least try and get in shape and lose weight. I wanted to beat my co-workers who were all 10 years younger than me. Screw them and their higher basal metabolic rate. I’m gonna hit this ball so far out of the park it’s gonna smash through windsheilds in the parking lot. So far I’m winning that competition. I went from 219 to 198 in 3 months and looking to have lost even more at the final weigh in on May 9th.

I’m gonna run for an hour every other day until May 10th. Dammit.

This – https://markmanson.net/benefits-of-being-slightly-crazy

5 things I enjoyed about Rogue One: A Star Wars Story

—- CONTAINS SPOILERS —-

Rogue One. It’s the movie that outlines what happens between Episode 3 and Episode 4. It’s the movie that explains why, why was that Correlian freighter being boarded in the opening scenes of A New Hope. It’s the movie that gracefully moves from the unknown (introducing an entirely new set of characters and back stories) into the known – the beginning of A New Hope and where we find out just what it took to get those Death Star plans. Here’s a short list of 5 things I enjoyed about this moving epic war movie. Continue reading 5 things I enjoyed about Rogue One: A Star Wars Story