Trying Out Programming Again, and Again, and Again... by Muhammad Amir Ayub

I'm a geek at heart, and it pains me to still be inept at programming and coding. Once upon a long time I was the Mac packager for Wesnoth, but I'm very much self-aware of my deficiencies. The lack of knowledge + skill plus the transition from student life to housemanship made me readily give up the role to people who professionally have a background in programming. I'm interested in just learning the ways and make programs that I can use to help myself in my daily activities (certainly not to make a fortune, though that'd be nice). For many years, the effort has never been consistent. I want to try again, now with Swift (previously tried out Objective-C but I failed miserably to get anywhere).

One area I want to try is to make a program to log my 5/3/1 progress. Currently I use Numbers to calculate my weights automatically (by keying in my training maxes) and log progress (with 5/3/1's estimated 1RM calculator):

The only numbers and details that matter nowadays are the ones in the box below the name of lift (e.g. 211 kg) and the numbers to the right of each main lift (percentage followed by weight, calculated automatically). The rest are all very outdated (…

The only numbers and details that matter nowadays are the ones in the box below the name of lift (e.g. 211 kg) and the numbers to the right of each main lift (percentage followed by weight, calculated automatically). The rest are all very outdated (e.g. that 143 kg was once upon a time my deadlift PR).

My log to chart lifts along with E 1RM's. Note how I only bothered to key in the dates only early on. The estimated 1RM formula is based on multiple reps and gets it wrong when I do a single rep only with the last set (there is no if condition). Con…

My log to chart lifts along with E 1RM's. Note how I only bothered to key in the dates only early on. The estimated 1RM formula is based on multiple reps and gets it wrong when I do a single rep only with the last set (there is no if condition). Consistency in lifting is key.

The derived charts. Note the drops coinciding with the moves to housemanship, Melaka (this one was major), HKL again, post competition. My progress has been stagnant for the past 3 months due to whatever.

The derived charts. Note the drops coinciding with the moves to housemanship, Melaka (this one was major), HKL again, post competition. My progress has been stagnant for the past 3 months due to whatever.

So now I'm trying to learn programming again; my mania has taken over (with help of copious amounts of home cold brewed coffee). Currently I've managed to write something in Swift that will calculate my training max (for now based on my true max) and subsequent training weights, with say my deadlift:

import UIKit

var helloPlayground = "Hello, playground"
print(helloPlayground)

class Lift {
    var liftName = String()
    var kg = "kg"
    var liftTrainingMax = Double()
    var liftLiftingMax = Double()
    var weight = Double()
    var percentage = Double()
    
    func calculateLiftTrainingMax(using liftLiftingMax:Double){
        liftTrainingMax = 0.9 * liftLiftingMax
        print("Say that my \(deadlift.liftName) max is \(deadlift.liftLiftingMax) kg \nMy training weights will be:")
    }
    
    func calculateLiftWeights (){
        var percentage: Double = 0.4
        var liftWeights = [percentage:weight]
        while percentage < 1 {
            var weight = percentage * liftTrainingMax
            percentage = (percentage*100).rounded()/100
            weight = (weight*10).rounded()/10
            liftWeights [percentage] = weight
            percentage += 0.05
            }
        for (percentage, weight) in liftWeights.sorted(by: <) {
            print ("\(Int(percentage*100))% : \(weight) kg")
        }
        }}

let deadlift = Lift()
deadlift.liftName = "deadlift"
deadlift.liftLiftingMax = 100
deadlift.calculateLiftTrainingMax(using: deadlift.liftLiftingMax)
deadlift.calculateLiftWeights()
deadlift.liftTrainingMax = 211
print("\nSay that I've a preset training max of \(deadlift.liftTrainingMax) kg (my actual current training numbers)\nNow my training weights will be")
deadlift.calculateLiftWeights()

And it's subsequent output:

Hello, playground
Say that my deadlift max is 100.0 kg 
My training weights will be:
40% : 36.0 kg
45% : 40.5 kg
50% : 45.0 kg
55% : 49.5 kg
60% : 54.0 kg
65% : 58.5 kg
70% : 63.0 kg
75% : 67.5 kg
80% : 72.0 kg
85% : 76.5 kg
90% : 81.0 kg
95% : 85.5 kg

Say that I've a preset training max of 211.0 kg (my actual current training numbers)
Now my training weights will be
40% : 84.4 kg
45% : 95.0 kg
50% : 105.5 kg
55% : 116.1 kg
60% : 126.6 kg
65% : 137.2 kg
70% : 147.7 kg
75% : 158.3 kg
80% : 168.8 kg
85% : 179.4 kg
90% : 189.9 kg
95% : 200.5 kg

My mania has led me to pay quite an amount to resubscribe to the Apple Developer Membership, and yes, I'm using the Developer beta's for iOS 12 and MacOS Mojave (which are actually much more stable than even the first public beta's for the previous versions of the 2 OS'es). I'm currently learning a bit from Youtube and trying things out (with Google, you can search anything for help quickly without thorough browsing of the documentation). Let's see where this rabbit hole will take me.

Trump' Child Separation Policy to Deter Immigrants by Muhammad Amir Ayub

Trump's zero tolerance immigration policy has been making news for a while, but the noise has never been louder. Yet the Republicans are not backing down on the policy of separating children from their parents, literally in cages. And it's the immigrants who are very much losers on this from the barbaric policy (and people talk smack about this country's handling of illegal immigrants): 

But after seeing news reports of wailing children in cages, Centeno said he now planned to stay longer in Mexico, taking a low-paying job in the kitchen of a seafood restaurant rather than risk losing his children indefinitely.

”You leave with the intention of going to the United States, where you can improve your life and that of your sons,” he said, flanked by his two boys, Axel, 9, and Steven, 3.

”But as things stand today, it’s difficult, because if you get caught, they take your kids away. I think I’m going to stay here, in Mexico, and establish myself.”

A rebound in the number of Central American migrants - most fleeing incessant gang violence in their impoverished homelands - being detained on the southern border prompted the Trump administration to implement the zero tolerance policy.

That policy, announced in April, directed that all immigrants apprehended while crossing the U.S.-Mexico border illegally should be criminally prosecuted.

Parents referred by border agents for prosecution are held in federal jails, while their children are moved into border shelter facilities under the custody of the Office of Refugee Resettlement, a Department of Health and Human Services agency.

It's probably this straw that's broken the camel's back:

The baritone voice of a Border Patrol agent booms above the crying. “Well, we have an orchestra here,” he jokes. “What’s missing is a conductor.”

Gruber has linked to an article highlighting just how ridiculous the defense has been.

The Trump administration is playing a game of choose your own facts, but every single version of this story ends with screaming children in cages.

All this in the land of the free and the home of the brave. Shaped by immigrants all over the world in it's history (including Trump's own bloodlines). The fucking richest country of the world.

It's a good thing that the US is withdrawing from the UN Human Rights Council. They have no right to be there if they're only interested in regressing:

The announcement came just a day after the U.N. human rights chief, Zeid Ra’ad al-Hussein, denounced the Trump administration for separating migrant children from their parents. But Haley cited longstanding U.S. complaints that the 47-member council is biased against Israel. She had been threatening the pull-out since last year unless the council made changes advocated by the U.S.

“Regrettably, it is now clear that our call for reform was not heeded,” Haley said.

Still, she suggested the decision need not be permanent, adding that if the council did adopt reforms, “we would be happy to rejoin it.” She said the withdrawal notwithstanding, the U.S. would continue to defend human rights at the United Nations.

The move extends a broader Trump administration pattern of stepping back from international agreements and forums under the president’s “America First” policy. Although numerous officials have said repeatedly that “America First does not mean America Alone,” the administration has retreated from multiple multilateral accords and consensuses since it took office.

Since January 2017, it has announced its withdrawal from the Paris climate accord, left the U.N. educational and cultural organization and pulled out of the Iran nuclear deal. Other contentious moves have included slapping tariffs on steel and aluminum against key trading partners, recognizing Jerusalem as Israel’s capital and moving the U.S. Embassy there from Tel Aviv.

...

Added Kenneth Roth, the executive director of Human Rights Watch: “All Trump seems to care about is defending Israel.”

I wonder if this administration can last a full term.

Try out Backblaze for free and protect your precious files.

NBA's "Me Too Moment"? by Muhammad Amir Ayub

One of the themes of the recently ended NBA season was multiple stars opening up about their mental health issues. But some are more influenced by the people around than others (just a part of human nature).

“The NBA gave me my depression,” Robinson told Bleacher Report in a wide-ranging interview. “I’ve never been a depressed person in my life.”

...

Robinson cited conflicts with coaches Tom Thibodeau and Larry Brown as being particularly burdensome. He told Bleacher Report that while with the New York Knicks, Brown called him “the little s—-“ every day. After Robinson went to Brown’s office in tears and asked him to stop, Brown again called him the name in front of the team and told his teammates that he had cried.

Brown told Bleacher Report that he didn’t have any recollection of what Robinson had recounted.

”I don’t know what I called him, to be honest with you,” Brown said. “If I did that, shame on me. I would feel terrible about that. That’s not who I am, but I don’t want to dispute Nate.”

Shame on you, Larry. I wonder if some of the Pistons players who were NBA Champions with him received such treatment as well. Sheed is probably one who'd actually perform better with such vitriol thrown at him.

George Karl on the other hand is someone who decided to expose his own rotten flesh (relatively older news): 

“My feelings for George Karl is that he is the person he is. He’s showing everybody who he is, the person I dealt with for six-and-a-half years in Denver,” Martin said on ESPN’s The Jump. “I saw it firsthand every day — him coming in the locker room and not speaking to people, him talking down to other people, him treating people in the organization like crap. I saw it year in and year out. Now the whole world is going to see it.”

Appearing on ESPN’s Mike & Mike on Thursday, the longtime NBA coach was asked whether he was surprised by the backlash to the book.

”There’s no question,” he said. “Surprised? Yeah, I guess there’s no question we all want to be liked a little bit. The backlash was interesting. A couple of things I learned from. I think the big thing is a couple of things. I probably should’ve studied — I didn’t know — I probably should’ve studied what I was writing a little more than I did.”

What a dumbass.

Addendum: The ultimate burn on Larry Brown from Jalen Rose: