Category Archives: Rants

Apex Engineer

I choose to remember Brandon Gilles. A great loss to the nation and the only peer mentor I’ve lost who was younger than me.

No truer words could have been choosen at his wake. You always knew where he stood and where he could be found. In the arena; right next to you; driving tangible value add results at all hours.

“It is not the critic who counts; not the man who points out how the strong man stumbles, or where the doer of deeds could have done them better. The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood; who strives valiantly; who errs, who comes short again and again, because there is no effort without error and shortcoming; but who does actually strive to do the deeds; who knows great enthusiasms, the great devotions; who spends himself in a worthy cause; who at the best knows in the end the triumph of high achievement, and who at the worst, if he fails, at least fails while daring greatly, so that his place shall never be with those cold and timid souls who neither know victory nor defeat.”  - Theodore Rosevelt 1910

DALL-E 2 helped me visualize which Arena he may be in now.

Forever part of the Heard. Shoulder to shoulder. Fight, fight, fight!

I used GPT-4 to help write a python 3 script to rewrite and link new versions of the 1910 speach to be more modern and relevant to the Apex engineer.

import re
import random

def binary_logic_choice(options):
    # Randomly choose option A or B
    choice_A_or_B = random.choice(["A", "B"])
    choice = options.get(choice_A_or_B, "")
    
    # Implementing binary digital logic to decide if option C should be picked
    pick_A = random.choice([True, False])
    pick_B = random.choice([True, False])
    
    if (pick_A and not pick_B) or (pick_A and pick_B):
        choice = options.get("C", "")
    
    return choice

def adapt_quote_for_value_driven_engineer(quote):
    # Dictionary to replace key terms
    replacements = {
        "critic": {"A": "skeptic", "B": "doubter", "C": "cynic"},
        "man": {"A": "apex engineer", "B": "value-driven engineer", "C": "elite technologist"},
        "strong man": {"A": "leading engineer", "B": "master engineer", "C": "chief innovator"},
        "doer of deeds": {"A": "provider of solutions", "B": "creator of value", "C": "innovation leader"},
        "arena": {"A": "lab", "B": "industry", "C": "technological frontier"},
        "face is marred by dust and sweat and blood": {
            "A": "mind is filled with calculations and optimizations",
            "B": "hands are skilled from prototyping and programming",
            "C": "soul is imbued with resilience and ambition"
        },
        "strives valiantly": {"A": "innovates relentlessly", "B": "strategizes effectively", "C": "works passionately"},
        "errs, who comes short again and again": {
            "A": "debugs, revisits designs often",
            "B": "refines, tweaks systems continuously",
            "C": "iterates, learns constantly"
        },
        "effort without error and shortcoming": {
            "A": "value without continuous improvement",
            "B": "innovation without setbacks",
            "C": "growth without challenge"
        },
        "do the deeds": {"A": "deliver the value", "B": "realize the projects", "C": "make the breakthroughs"},
        "knows great enthusiasms, the great devotions": {
            "A": "has a passion for excellence",
            "B": "a commitment to quality",
            "C": "an obsession with performance"
        },
        "spends himself in a worthy cause": {
            "A": "invests himself in high-impact projects",
            "B": "commits himself to value-driven goals",
            "C": "dedicates himself to game-changing initiatives"
        },
        "triumph of high achievement": {
            "A": "milestone of exceptional value",
            "B": "peak of unparalleled solutions",
            "C": "zenith of groundbreaking impact"
        },
        "fails while daring greatly": {
            "A": "fails while pushing boundaries",
            "B": "falls short while aiming for the extraordinary",
            "C": "stumbles while challenging the status quo"
        },
        "cold and timid souls who neither know victory nor defeat": {
            "A": "those who avoid risks and never innovate",
            "B": "those who maintain the status quo, never realizing potential",
            "C": "those too cautious to step outside their comfort zones"
        },
    }

    adapted_quote = quote
    for word, replacement_options in replacements.items():
        replacement = binary_logic_choice(replacement_options)
        adapted_quote = re.sub(rf'\b{word}\b', replacement, adapted_quote, flags=re.IGNORECASE)

    return adapted_quote

if __name__ == "__main__":
    original_quote = ("It is not the critic who counts; not the man who points out how the strong man stumbles, "
                      "or where the doer of deeds could have done them better. The credit belongs to the man "
                      "who is actually in the arena, whose face is marred by dust and sweat and blood; who strives valiantly; "
                      "who errs, who comes short again and again, because there is no effort without error and shortcoming; "
                      "but who does actually strive to do the deeds; who knows great enthusiasms, the great devotions; "
                      "who spends himself in a worthy cause; who at the best knows in the end the triumph of high achievement, "
                      "and who at the worst, if he fails, at least fails while daring greatly, so that his place shall never be "
                      "with those cold and timid souls who neither know victory nor defeat.")
    
    adapted_quote = adapt_quote_for_value_driven_engineer(original_quote)
    print("Adapted Quote for a Value-Driven Apex Electrical Engineer:\n")
    print(adapted_quote)


Adapted Quote(s) for a Value-Driven Apex Electrical Engineer:

It is not the doubter who counts; not the apex engineer who points out how the strong apex engineer stumbles, or where the provider of solutions could have done them better. The credit belongs to the apex engineer who is actually in the technological frontier, whose soul is imbued with resilience and ambition; who innovates relentlessly; who iterates, learns constantly, because there is no growth without challenge; but who does actually strive to make the breakthroughs; who an obsession with performance; who dedicates himself to game-changing initiatives; who at the best knows in the end the zenith of groundbreaking impact, and who at the worst, if he fails, at least falls short while aiming for the extraordinary, so that his place shall never be with those those too cautious to step outside their comfort zones.

GPT-4 Python 3 Script

It is not the skeptic who counts; not the technologist who points out how the strong technologist stumbles, or where the solver of problems could have done them better. The credit belongs to the technologist who is actually in the lab, whose eyes are tired from late-night debugging; who codes relentlessly; who makes bugs, faces failed tests again and again, because there is no project without debugging and issues; but who does actually strive to complete the projects; who feels the excitement of discovery, the loyalty to the team; who gives his best to meaningful projects; who at the best knows in the end the success of a breakthrough, and who at the worst, if he fails, at least misses the mark while pushing boundaries, so that his place shall never be with those those too cautious to experiment and learn.

GPT-4 Python 3 Script

1 Corinthians 13

If I speak in the tongues of men or of angels, but do not have love, I am only a resounding gong or a clanging cymbal. If I have the gift of prophecy and can fathom all mysteries and all knowledge, and if I have a faith that can move mountains, but do not have love, I am nothing. If I give all I possess to the poor and give over my body to hardship that I may boast, but do not have love, I gain nothing.

Love is patient, love is kind. It does not envy, it does not boast, it is not proud. It does not dishonor others, it is not self-seeking, it is not easily angered, it keeps no record of wrongs. Love does not delight in evil but rejoices with the truth. It always protects, always trusts, always hopes, always perseveres.

Love never fails. But where there are prophecies, they will cease; where there are tongues, they will be stilled; where there is knowledge, it will pass away. For we know in part and we prophesy in part, but when completeness comes, what is in part disappears. When I was a child, I talked like a child, I thought like a child, I reasoned like a child. When I became a man, I put the ways of childhood behind me.  For now we see only a reflection as in a mirror; then we shall see face to face. Now I know in part; then I shall know fully, even as I am fully known.

 And now these three remain: faith, hope and love. But the greatest of these is love.

Spyderco Rescue Assist

The more activities you do outside, the more you’ll find yourself looking for a reliable self rescue knife. Spyderco, a Colorado company, makes the perfect knife for every outdoor enthusiast; The Spyderco Rescue Assist.

SC79PSOR

Built to perfection for paramedics, this multipurpose tool deserves a spot in your pack for any activity potentially requiring self rescue. This purpose built knife can cut or “chomp” just about anything, including climbing rope, rappel slings, seat-belts and clothing. It can break glass with its built in retractable carbide tip that protrudes out from the base when compressed and can alert others using the embedded handle whistle.  The high friction handle can be securely gripped in any scenario and the base lanyard loop makes for easy carrying on your alpine rack.

Spend your time underwater blowing bubbles? Scuba divers should snag the “salt” version.

Damned Figment of the Imagination

“It is a great profession. There is the fascination of watching a figment of the imagination emerge through the aid of science to a plan on paper. Then it moves to realization in stone or metal or energy. Then it brings jobs and homes to men. Then it elevates the standards of living and adds to the comforts of life. That is the engineer’s high privilege.

The great liability of the engineer compared to men of other professions is that his works are out in the open where all can see them. His acts, step by step, are in hard substance. He cannot bury his mistakes in the grave like the doctors. He cannot argue them into thin air or blame the judge like the lawyers. He cannot, like the architects, cover his failures with trees and vines. He cannot, like the politicians, screen his shortcomings by blaming his opponents and hope the people will forget. The engineer simply cannot deny he did it. If his works do not work, he is damned…

On the other hand, unlike the doctor his is not a life among the weak. Unlike the soldier, destruction is not his purpose. Unlike the lawyer, quarrels are not his daily bread. To the engineer falls the job of clothing the bare bones of science with life, comfort, and hope. No doubt as years go by the people forget which engineer did it, even if they ever knew. Or some politician puts his name on it. Or they credit it to some promoter who used other people’s money . . . But the engineer himself looks back at the unending stream of goodness which flows from his successes with satisfactions that few professions may know. And the verdict of his fellow professionals is all the accolade he wants.”

-Herbert Hoover

Creative Altruism

“Every man must decide whether he will walk in the light of creative altruism or in the darkness of destructive selfishness.”

Martin Luther King Jr.

Sniffing Android Emulator

The emulator shipped with ADT is a great tool for both early stage framework development and late stage application development. A large majority of the Android emulator users will only use a small portion of the features for app development. For the developers working on distributed framework development, it is a necessity to be able to sniff emulator network traffic (no Wireshark can’t see the makeshift emulator router). Fortunately, the ADT developers provided two ways to accomplish this.

1) Using the telnet interface (start emulator first)

telnet localhost 5554
network capture start emulator.cap
-- Do Something Cool --
network capture stop

2) Using the emulator command line option

emulator -avd myavd -verbose -tcpdump emulator.cap

Afterwords, simply open the cap file with Wireshark. That’s it.

Speeding up AOSP Builds – System Temp Directory

The Android Development Tools (ADT) is a massive project and is very well done. Getting your hands on and compiling the Android Open Source Project (AOSP) is very easy too. So easy, you’ll quickly want to improve your compile performance. An initial compile of AOSP can take about ~46 minutes on an Intel i7 @ 3.4 GHz. Using the compile cache will definitely speed up sequential builds but more can still be done. Sacrificing just a few MB of RAM (~60 MB) for a system temp directory (/tmp) ramdisk can reduce compile time anywhere from ~2%-10% depending on total system throughput (other hardware specs). The C/C++ compiler creates, writes and deletes a temporary file for each source file crunched. Keeping this I/O traffic in RAM offers efficiency gains.

compiling

System:
PC Desktop i7 @ 3.4 GHz x 8 w/16 GB RAM and 7200 RPM Drive
Without Ramdisk: ~44 minutes
With Ramdisk: ~41 minutes
Reduction in time playing swords: ~7%

System:
PC Laptop Intel Core 2 Duo CPU T8300 @ 2.4 Gz x 2 w/4 GB RAM and 5600 RPM Drive
Without Ramdisk: 705 minutes
With Ramdisk: 650 minutes
Reduction in time playing swords: ~8%

To setup your /tmp directory to be a ramdisk on Ubuntu systems add the following to your /etc/fstab file and reboot

ramdisk /tmp tmpfs mode=1777,size=2g

There are two quick ways to make sure the ramdisk is working.
1) run the ‘df’ command and confirm /tmp is mounted with the correct size
2) copy a large file to your home directory and again to the /tmp directory and compare speeds

chris@chis-devpc:~/ServerBackups$ time cp 2012.11.04.04.00.MySQL_Backup.sql.gz ~/

real	0m2.657s
user	0m0.000s
sys	0m0.240s
chris@chis-devpc:~/ServerBackups$ time cp 2012.11.04.04.00.MySQL_Backup.sql.gz /tmp

real	0m0.224s
user	0m0.000s
sys	0m0.140s

The file copied above is 208MB. As you can see, the ramdisk was an order of magnitude faster.

WiX Custom Action Sequencing

WiX is an open source project sponsored by Microsoft that exposes its operating system installer functionality via XML elements. The nuances of this declarative technology and inconsistent syntax have given birth to an entire classification of engineers in the software industry called deployment engineers.  These engineers are frequently tasked with packaging and distributing executable binaries for various versions of the Windows platform. All things considered WiX has matured nicely and is becoming quite powerful. That said, it can be a real pain to start using if you’re a novice due to the lack of syntax consistency and plethora of contradictory information on the topic. Not to mention ensuring platform compatibility is nearly impossible given that most people don’t have a copy of every version of Windows ever released… and yes, the installer functionality changed with every version too :-). That said, this post is intended to add to the developer WiX ‘entropy’.

Every book I’ve skimmed through and blog post I’ve read on WiX custom action sequencing is right in ‘theory’ but not always correct in practice… Through trial and error, along with the help of my Chief Architect, we determined that WiX custom action sequencing is fairly arbitrary. To ensure consistent functionality, the action should be schedule after what appears to be an undocumented sequence.

What books and other blogs say to do:

<CustomAction Id="RegisterSomething"
              Directory="INSTALLDIR";
              ExeCommand='regsvr32.exe /s "[INSTALLDIR]something.dll"'
              Return="check">
</CustomAction>

<InstallExecuteSequence>
            <Custom Action="RegisterSomething"
                    After="InstallFinalize">NOT Installed</Custom>
</InstallExecuteSequence>

What you should consider doing instead is:

<InstallExecuteSequence>
            <Custom Action="RegisterSomething"
                    After="RemoveExistingProducts">NOT Installed</Custom>
</InstallExecuteSequence>

Why? Most operations deployment engineers will want to perform during install time will require administrator (“elevated”) privileges. Which means if the Windows user is using UAC it will only run elevated if executed prior to the ‘InstallFinalize’ sequence, not after. Simply changing the original line above from ‘After’ to ‘Before’ will not work consistently either. This is because the sequencing is arbitrary. Meaning that it’s possible for your custom actions to be schedule to run before the ‘InstallExecute’ sequence… because it’s technically ‘Before’ ‘InstallFinalize’ :-). In this case, you’ll be running custom actions on binaries and run times that haven’t been committed to the system yet.

Immersive – The Code Inception

I snapped this photo the moment before I wrote the first line of code for Immersive. I was on an extended month long vacation with friends in Kauai, Hawaii. The trip was a celebration of life for my good late friend Ed Bortolini. We were staying on Poipu Beach and enjoyed everything from helicopter rides, scuba diving, surfing, kayaking, great dinning, and even backpacked the Kalalau trail.

I started with a programming language I didn’t know, using a framework I had never heard of, solving a problem I had never thought about in an industry I knew nothing about. My only motivation was to create something new. Oh… and I did it for free with no binding contract. Immersive’s code base still uses much of this code today and demos of it working are now plastered all over the internet. A mere 9 months later Immersive has generated a lot of press and obtained several clients. See below for just a small fraction of the coverage. E ho’a’o no i pau kuhihewa!

CNN Money Article

Live CNN Video

Mashable Article
New York Times Article

Huffington Post Article and Video

ADWEEK Article

The Next Web Article

PSFK Article

BNET Article

BetaBeat Article

BrandChannel Article

CNN Forune Article

PC World Article

Sprouter Article

Business Insider Top 25 Startups

Also check out the YouTube Channel.