mattthommes-blog
mattthommes-blog
Matt Thommes
2K posts
My personal web log about technology, music, software, life, and more. Hand-crafted and written since 2002/03.
Don't wanna be here? Send us removal request.
mattthommes-blog · 1 year ago
Text
✅ 🧭 Exciting week for me as I am finally getting OmniFocus 4 setup. One of the best and most streamlined Mac, iOS & watchOS apps that I have depended on daily for 10+ years has some updates and modernization. This is an app where the true power lies under-the-hood and let’s you slice and dice your GTD approach like a pro. I have always considered it my “compass” as it keeps me on track across many facets of my life.
I haven’t dug into all the changes yet to see if this is just cosmetic but I am also not looking for big flashy features that might lack depth. More so I appreciate continual improvements and consistency that can be depended on.
0 notes
mattthommes-blog · 1 year ago
Text
My Core Tenets
In the spirit of Mary Schmich & Baz Luhrman’s “Wear Sunscreen,” here are some core tenets/values I embrace these days as a software engineer (this will change or morph for sure over time but these are today’s beliefs). Consider this as advice to my past, less experienced self. I know it’s not quite commencement season, but let’s go with it anyway.
“Ladies and gentlemen of the class of ‘24. Wear sunscreen. If I could offer you only one tip for the future, sunscreen would be it. The long term benefits of sunscreen have been proved by scientists, whereas the rest of my advice has no basis more reliable than my own meandering experience. I will dispense this advice now.”
Take initiative without being asked.
Leave the code (and documentation) in better shape than when you arrived. Little changes add up over time.
Build for the thrill of it. There are always shortcuts but when you take the longer way it is far more fulfilling and you will have gained something.
Break it down until it makes absolute sense. There is hardly room for ambiguity in this field. You must know and be able to explain why with all of your current understanding.
Know what problem you’re trying to solve (and write it down) before diving into any solution. The final result may look nothing like originally conceived. But without that compass you can be assured things will go in circles first.
Use the tools at your disposal. Do not underestimate the power of IDE’s, debuggers, and AI.
Use checklists obsessively. Your brain works best thinking creatively and not while bogged down by mundane minutiae.
Automated testing isn’t only about checking off a requirement. It is about challenging and uncovering the truth about your assumptions. At worst you will find bugs you didn’t realize existed. At best you may notice the full scope of changes are not even needed. And somewhere in between you will become enlightened.
Pair and brainstorm often. You will almost always come away having learned or uncovered something new.
Conceive of fun side projects. Nothing helps inspiration and learning better than to be building something for yourself on your own terms.
Don’t provide precise estimates. You will almost always under estimate. Get as close as you can to saying, “It will be done when it’s done” without actually saying that.
Expect priorities to constantly change. Find a sane approach to allow some turbulence while still making progress on larger goals.
Give reviews like you’d want to receive them. Don’t expect someone to know exactly what you’re talking about.
Learn to accept critical feedback just as easily as you think to give it. If you succeed in doing this, tell me how.
Spend time on the front lines for perspective now and again. Understand that people like you are using what you’re building, and they all have unique, nuanced issues that you may never have considered.
And always remember: attitude and adaptability can beat pure talent every time.
0 notes
mattthommes-blog · 2 years ago
Text
AIDE: AI in my IDE
Tumblr media
Disclaimer: AI did not write this post.
I’ve been using GitHub Copilot (AI for programming) in my IDE/code editors for over a month now and it’s truly transformed the coding experience and general expediency of my work. It is like autocomplete on steroids. The suggestions are usually spot-on but it’s not always perfect. However it’s enough to help me deliver changes faster and with more confidence, as well as discover new or better ways to write code that solves a particular problem.
Human brains are wired to be distracted especially in this overwhelming notification age we live in. It’s very easy to forget simple things or not be thinking about a coding problem the correct way due to distraction, fatigue, other priorities, etc. I tend to work better in the morning as that is my peak time of day for mental processing. But the rest of the day the additional boost AI gives me is like caffeine but without the jitters, sleeplessness, or super fancy code refactoring that may not have been necessary when a simpler solution would have sufficed.
I’ve found the most success with AI when providing it as much surrounding context as possible. An empty class/object without methods, composition, or inheritance won’t yield great results, but one that provides some clues as to other code being used/shared will provide more accurate suggestions.
Tumblr media
^ Not a very useful Copilot suggestion since I didn’t provide any useful surrounding context.
Tumblr media
^ More useful Copilot suggestion since I provided the function name.
A big benefit for me so far has been with unit test coverage. It shines at providing me test cases or scenarios that I might be overlooking when writing tests. Also it handles providing repeat boilerplate code (common in unit tests) which saves a tremendous amount of time in getting a change from “still adding tests” to “ready for review.”
Tumblr media
^ Example Copilot suggestion after only typing the test class name. It wrote a boilerplate test method for the one class method. This at least gets me going with tests faster.
For me Copilot has been the same experience in both JetBrains and VS Code. Suggestions appear as darkened italicized text and hitting the Tab key confirms I want to use the suggestion. Hitting any other key removes the suggestion. This consistency allows me to easily jump between the two editors for different projects with ease.
With Copilot/AI my approach to tackling a coding task has also been altered. I have started learning when Copilot will kick in and when it will provide the best suggestions, in order to more quickly prepare changes for review. Knowing I don’t necessarily need to write a ton of boilerplate code lowers the barrier to getting started on a coding task and not being afraid to dive right in and experiment. I can provide AI the roadmap and it will fill in the little details as I go. It also eases the doubt and anxiety around attempting a new approach, knowing that I am on the right path when Copilot suggests something very similar to what I was already thinking.
But with all new things comes new responsibility and caution. In general AI won’t solve every coding challenge you face - it will only help you build solutions faster by providing assistance in the form of very advanced autocomplete. You still need to carefully consider all angles from code readability, scalability, and testability (some other “abilities” might be in there also 😄). After all, the coding part is easy. It’s the problem solving and project requirements that are the real challenge.
0 notes
mattthommes-blog · 2 years ago
Text
Tips for hitting well in MLB “The Show”
Tumblr media
I’ve been playing MLB The Show ’18 “Road to the Show” for a good couple of years now (I’m still in Triple-A though) and over that time I’ve learned a lot of good hitting tricks to gain more positive points and have a better overall batting average and stats. As mentioned, this is only from my experience in Double and Triple-A (on Veteran difficulty) so I don’t even know yet what the big league pitchers will look like. But I think these tips are a good foundation regardless. A lot of these tips apply to real world batting also! It’s amazing how realistic The Show is.
1. Patience
First and foremost, don’t beat yourself up. I started out a very poor hitter but it was mainly due to impatience and wanting to just quickly be “good.” It doesn’t work that way, and that’s a testament to the level of realism in The Show. You have to work at it and have patience. The rewards will follow! There are so many regular season games no matter what level you are at. Shake it off and get out there the next day/game and work on the little things.
2. Practice
Do the batting practice challenges - I can’t overstate the importance of this. One drawback is the variety of pitches you see and pitcher delivery differentiation is not great during batting practice (it tends to always be the same style pitcher from your team, and I hardly ever see breaking pitches that drop out of the zone) but you can still work on your timing and discipline which pays off immensely in actual game situations.
Tumblr media Tumblr media
3. Follow the ball path
While waiting for delivery, watch the ball the moment it comes out of the pitchers hand and as it travels towards the plate. The extra split second you gain from seeing the origin of the ball can help you more easily follow its trajectory to the plate and decide if it’s worth swinging at.
4. Should I swing?
Decide if the pitch looks like a ball from the get-go. You want to rule that out pretty quickly because if you think it might be a ball then nothing else matters at that point. Another way to think of it: does the pitch look like it’s worth swinging at? Sometimes you can immediately see it will be too high or way outside. Other times it’s more difficult to discern but you have to rule out it being an obvious ball or a possible strike. Do you even want to attempt to swing? If not, then nothing else matters.
5. Wait
If the answer to #4 is “yes, I want to swing at this,” the next tip is to wait: let the ball come to you. Don’t reach for it. This is something I struggle with constantly. I’m over-eager and I see an appetizing pitch so I swing super early and completely miss a perfect pitch in the strike zone. It’s almost embarrassing. Most pitchers in Triple-A don’t even have an overwhelming velocity so you almost never need to immediately swing.
6. Know your job
Knowing your job in game situations is very important. Are there runners in scoring position with less than two outs? Is it the last inning where your team might need a spark? Knowing what your team needs is more important than your individual stats/performance.
So once you are certain you want to swing at a pitch, and you’ve waited for the ball to come to you - determine what type of swing (contact, regular, power) and pressure/aggression you want to apply. If it’s a super appetizing pitch in the middle of the zone, you might want to swing aggressively for power and see if you can really drive it out. If it’s a pitch more on the edge of the zone, you might want swing for contact and try for a simple base hit which is helpful with runners in scoring position - your job in this scenario is less about crushing the ball and more about getting your teammates across the plate.
That’s it for now!
0 notes
mattthommes-blog · 4 years ago
Text
Good review of the current state of e-readers but the focus is primarily the hardware aspects. There is some mention of software and syncing your books.
I still rely on a very old and cheap Kindle reader from around 2011. It is perfect because it is inexpensive so I don’t feel bad tossing it in a bag, dropping it by accident, etc. It shows a bunch of wear and tear which actually adds charm, like a good used paperback book that shows it’s mileage.
But the key reason I’m still fond of this old Kindle is the physical buttons and lack of a touchscreen interface. I owned a Kindle Paperwhite briefly around 2016 and quickly re-sold it. I hated the lack of physical buttons and always accidentally triggering page turns, highlights, jumping around the book by simply picking up the device and part of my hand touching the screen.
In a world of software interaction, there’s something to say for buttons being tangibly necessary on devices that you hold and that require frequent prompts like page turns. A button just feels more satisfying and natural.
And most importantly, a device screen does not need to always be ready for interaction especially for a device like an e-reader that is used for consumption 95% of the time. The screen itself should only “engage” if the user wants it to, never accidentally.
0 notes
mattthommes-blog · 4 years ago
Text
Change
Life is itself cyclical. There’s a beauty, purpose, and mastery layered in the repetition and iteration which instills learning, growth, synergy.
The light of difference shines tomorrow lest we deny the sameness of today.
0 notes
mattthommes-blog · 4 years ago
Text
Always in the Mood to Budget
Budgeting is control, power, privilege. You shape your future by budgeting consistently and honestly. That results in freedom to spend without guilt or worry.
I enjoy the budgeting process a couple of times per month. Don’t get that confused with the transaction process which is a daily thing. The budgeting process is that of allocating your available funds into categories which typically happens after paychecks come in.
Also don’t confuse “budgeting” with “forecasting.” Budgeting is only allocating the cash you have. Forecasting is the attempt to predict where your future income/cash will go and it is unreliable and unpredictable.
Sitting down to budget is empowering. I control my financial destiny as opposed to life deciding what financial chaos it wants to surprise me with. When life tries to sink me with yet another bill or payment, I am prepared. I punch back with more fervor and I knock out life’s attempt to push me off balance.
Budgeting is a discipline which, when conducted properly, results in many more benefits than being prepared for surprises and peace of mind. Budgeting also provides clarity and visibility into your finances which helps catch unnecessary or wasteful spending.
That subscription you hardly use but is deducted from your checking account consistently each month can often get lost in the transaction shuffle and therefore go ignored. This is partly a strategy of subscription based services: charge an innocent/low fee per month while comparing it to “ about the same as your daily cup of coffee,” making it sound appealing and affordable. Over time that monthly cost adds up fast. Suddenly it’s no longer similar to a cheap cup of coffee but instead to a daily Starbucks trip without the pleasure of the purchase since it’s automated and under the radar.
Budgeting exposes your financial waste and helps you trim the fat while putting your money where it matters.
You know your life priorities. If your income suddenly stopped today, where would you need your cash to go first? Make a list and prioritize top to bottom every category you would need cash the most. For most people the top category is “mortgage.” You need a home, right? From there, what do you need operational in that home? Obviously electricity, heat, water, food. Keep going even when you reach the “nice to have” categories such as “Netflix” or “new grill.” Those low priority categories matter also because they define your quality of life.
Budgeting is not imprisonment. It’s actually freedom. By defining and prioritizing every aspect of your spending, you release the burden and guilt behind your spending. You can rest peacefully knowing your bills are paid ahead of time and you can still enjoy another draft beer or that sudden splurge you spend on the kids one afternoon.
Get started with YNAB today (I get a kickback if you use this link 😄). It will truly change your life and mood!
0 notes
mattthommes-blog · 4 years ago
Text
Things I dislike about the Netflix app
I’m a long-time Netflix user, back to the days of DVD deliveries (2006 or around there). I haven’t been a member continually that long - I took a few years break before signing up again for their streaming service.
I’ve always loved having access to such a huge backlog of movies and shows without having to make a physical trip to a store.
I’m still a fan of the streaming service so I’m not about to quit or anything. There are just some little gripes I have.
Some things I miss greatly about the service, either features that were removed or have never been there to begin with:
Lack of comments or user reviews
Lack of star rating system to track my activity and preferences over time
Forced previews
Limited search and filtering options
Lack of a website for a more feature-rich experience
Lack of a social aspect
Everything except the forced previews (which is just an annoyance) really hinder my ability to find hidden gem movies from years ago. I’m not always looking to watch the “latest and greatest” trending movie. I often like classics and movies from different eras. Good movies don’t get old - they age like a fine wine. But if I can’t easily surface those movies in the app, it defeats the purpose of having access to such a huge catalog.
The old DVD service offered five star ratings which I loved to use as a marker/indicator for the movies I’ve seen. I could then build up a personal preference for certain styles or directors. It was also a cool way to showcase to friends which movies I’ve seen recently and what I thought of it.
It’s still possible to find hidden gems and deep cuts within the service, but I have to know what I’m looking for because it’s hard to filter on anything but a title. Sometimes I want to watch a bunch of flicks from certain directors and it seems simple to implement a director search feature.
The service is so dumbed-down now. It’s probably intentional in order to allow Netflix to force their own content on users. But I wish it still allowed deeper and broader flexibility for users that want it.
0 notes
mattthommes-blog · 6 years ago
Text
Trigger Local Python App Remotely
This post is also published on Codementor.
With an old Mac I have lying around at home and free web-based services, I’ve setup a simple app that fetches some data from an external service (YNAB) in order to run some daily budget calculations that I used to calculate manually for a long time. The output of my app is then sent back to my phone within seconds so I can trigger it from anywhere. I wanted to share the approach I’m using which has cost me nothing.
This (obviously) isn’t an approach that should be used for large scale applications or anything other than pet projects. I just wanted to highlight how simple it can be using existing free tools. There are plenty of low cost, production ready, and scalable options out there (like AWS Lambda) if you prefer to start with that approach.
My app is written in Python and served via Flask to a local endpoint (http://localhost:5000) which ngrok points to. I then have a IFTTT webhook hitting the Ngrok URL after clicking an IFTTT button widget from my phone. The app ends up broadcasting the output to my Slack account so I end up getting a push notification on my phone containing the app output within seconds of hitting the button:
Again, all free tools (Flask, ngrok, IFTTT, and Slack) and I’m using a nine year old Mac that I only use for light web browsing, streaming, and basic programming projects. So I was able to put existing equipment to use.
Brief diagram of the entire flow:
IFTTT Button Widget
Here is the button I press on my iPhone’s home screen to trigger the app:
On iOS, the IFTTT button widget is really simple to configure. I’ve just inserted the ngrok URL that is configured on my local computer to trigger the app:
Ngrok
On my Mac I enable ngrok by running:
./ngrok http 5000
This provides me the URL that I need to use with IFTTT. Just keep in mind that unless you are on a paid ngrok plan, every time you restart your computer (or just quit and re-start ngrok) you will have a new URL to paste into IFTTT. That can be an annoying thing after a while, but the key here is free.
Flask
Running Flask is as simple as specifying the local endpoint that you want to trigger your app:
@app.route('/ynab-balances') def run(): runYnabAccountBalanceCheck() return "Done"
Then in Terminal you can start the app so it’s waiting for requests:
$ python3 my_ynab_balances.py * Serving Flask app "my_ynab_balances" (lazy loading) * Environment: production WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead. * Debug mode: off * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
Slack
My Python script uses a Slack API client to broadcast anything I want to my Slack account:
def send_to_slack(self, output): self.slackClient.chat_postMessage(channel='@Matt', text=output)
I’ve set it up to send the app output to my own Slack username which ends up like a private message to myself.
Deploy New Code Changes
When I make updates to the app, I push to Github and then I manually run git pull on my Mac to fetch the latest changes. This requires me to either physically be in front of my Mac or use a VNC app (such as Screens) to remote control my Mac. In either case it’s tedious. My next plan is to set up a simple cronjob that pulls down the latest code on a recurring basis.
0 notes
mattthommes-blog · 6 years ago
Text
Florida Scenes
A few of the more photographic scenes from my recent Florida trip.
Tumblr media Tumblr media Tumblr media
0 notes
mattthommes-blog · 7 years ago
Link
This is interesting but is taking things to the extreme.
For one, earbuds will cease to perform any social signaling whatsoever. … Having them in while silent is a sign of inner focus—a request for privacy. That’s why bothering someone with earbuds in is such a social faux-pas: They act as a do-not-disturb sign for the body.
I actually think of AirPods as less of a “privacy request” than being tethered. Being tethered means you really had to work to untangle those headphones and are willing to walk around with a cord flapping about (unless you do the under-the-shirt trick). So in most cases being tethered means you actually have audio playing and would not hear someone talking to you anyway. Since AirPods are more likely to remain in your ears even when audio is not being emitted, I feel that it’s plausible that the person will hear you talking to them.
But if AirPods or similar devices become widespread, those cues will vanish. Everyone will exist in an ambiguous state between public engagement with a room or space and private retreat into devices or media.
There is more to social cues than just hearing. There’s eye contact, looking in someone’s direction, etc. Those are cues that an AirPod wearer can (and should) still provide to signal they are open to social interaction even with the devices in their ears.
Finally, if the day came where we all had these in our ears, it’s not going to mean we’ll never interact with each other again. Instead, it means the AirPods will simply be forgotten (by blending into us). This “Incredibles” quote sums it up best:
When everyone’s a super, no one will be.
0 notes
mattthommes-blog · 7 years ago
Text
Tasking My Day
I’ve been using a “to do” app (“task management,” “GTD,” whatever the cool kids call it these days) for over a decade now. I currently use OmniFocus but before that I used a custom built webpage that I maintained the codebase by hand. I can tell you there were many “meta” type tasks that related to the to-do app itself. Building a web app from scratch and using it every day I would obviously find many things I wanted to add, fix, or improve, and it was very hard to do all that while still using the app in a stable form for its purpose of task management.
My decision to use OmniFocus freed me from having to develop my custom to-do app and instead allowed me to focus on task management itself. But I had to buy in to their methodology, features, and conventions. I was willing to accept this trade-off, IE: the less time I spent building and fixing my custom app increased my overall quality of life and time spent reaping the benefits that a to-do should provide: you know, getting things done?
But regardless of the app used, I recently noticed it was my approach to tasking that has really been holding me back. I’ve recently changed my approach and I’m already noticing benefits at least from a mental perspective.
Instead of assigning rough due dates and hoping to squeeze the tasks in each day (then being let down that I wasn’t able to get to some tasks which end up sitting in overdue for days or weeks) I’ve decided to start being more realistic. I am one person that can only accomplish so much. I should only forecast the tasks I truly believe can be accomplished. This, and breaking down tasks into reasonable chunks that can actually be done in a timely manner has helped me feel I am getting more done, and has reduced the chance of getting mentally lost down a winding road of research, thought, and frustration, knowing that the clock is always marching forward while I’m often sitting still and not making progress.
So to clarify, here are the foundations of my new task management approach:
Stop letting tasks sit in an overdue state for too long. If it’s overdue it should be attended to right away, or deferred to another date. You can’t do tasks in the past. Unless you have a time machine, an overdue task (despite your genuine intentions to really want to do it) is meaningless.
Forecast due dates and times for tasks that can actually be accomplished by breaking down tasks into reasonable and focused chunks of work. If I can’t quickly figure out a way to handle a task, it’s probably too broad and needs to be broken down. It’s all about actionable items. Ideas don’t belong in your task management system unless you have a plan of attack.
Always refine due dates and times. Every evening I forecast my tasks for the entire next day. Then throughout the day as I’m accomplishing things and priorities shift, I’m adjusting individual task due dates and times to account for the remaining hours in the day.
It’s okay to defer. Again, priorities shift and distractions abound. Unexpected things happen constantly. By always being realistic I no longer fool myself into overloading tasks when I know I’m not going to get them all done. Instead I just push them off to a later date. If they are really important they will find their way back to me. It's more essential to have clarity in the current moment.
A task-free day (or days) is okay and is usually required. On days off or weekends I’ll sometimes have no energy or motivation to attend to my to-do items. I just need the occasional break from it all. I’ve learned that my task list shouldn’t be the boss of me. I can just defer non-urgent items to another day. It’s also important to allow yourself that mental break to let your mind reset.
That's it for now!
2 notes · View notes
mattthommes-blog · 7 years ago
Text
Thoughts on “USS Callister” (“Black Mirror,” Netflix)
Of all Black Mirror season 4’s episodes, “USS Callister” is probably my favorite for a few reasons:
It’s code/tech-related.
Jesse Plemons (“Breaking Bad,” “Friday Night Lights”) is pure gold as a creepy evil character.
It’s so vastly different from other Black Mirror episodes (the whole Star Trek riff).
It has a feel-good ending with a cool cameo.
I’ll admit I’ve never watched much Star Trek, but I appreciate a good riff now and again.
Synopsis
For those who haven’t seen it, I’m going to spoil it soon so best click away. But first, a quick and harmless overview/synopsis:
Using really advanced technology, a CTO of a popular VR gaming company clones some of his co-workers and proceeds to torture them in a never-ending game of Star Trek (which is called “Space Fleet” in the episode). The original co-workers don’t know they’ve been cloned, but the clones know they’ve been cloned and are fully aware of their dual-selves. Apparently their cloned self is capable of feeling pain, humiliation, and have a complete memory of their lives intact - just like their original selves. So for all intents and purposes, their cloned selves are their original selves but stuck in another universe.
That universe is a modified VR game where the CTO presides as “Captain Daly” of “USS Callister” - a space vessel. The captain requires everyone to play along or he can do horrible things to you like turn you into a giant monster bug (and have you feel everything) or clone your child and throw them out of the space vessel airlock while you are forced to watch.
This is all taking place undisturbed for a good while until a new employee named Nanette starts working at the company. She praises the CTO for his coding skills and for one reason or another is cloned into the VR game where she learns of the indescribable events that are taking place in this virtual hell.
Nanette refuses to let the charade carry on and devises a plan to allow their cloned selves to escape the space vessel.
Spoilers ahead.
From within the game, Nanette figures out a way to communicate with the outside world (outside of the VR game, that is). She ends up contacting her real self and provides instructions on how to defeat Daly.
The plan works and Daly is trapped in his modified VR game for eternity.
Random thoughts
I’ll start with Daly at the end of the episode.
Daly can’t escape his own game because of an update patch that deletes his modified code. So now there are two Daly’s: one in the real world and one in the VR game. Unfortunately the episode ends without explaining this, but to me it seems like the real Daly will forever sit in his chair and eventually die of malnourishment? What would happen to the cloned Daly? I assume he would remain in the game because the game “exists” somewhere.
However, are there really two Daly’s? If you think about it, Daly never cloned himself. He only uploaded himself into the game. Since the “exit game” commands no longer work, Daly’s brain still exists in the game but will eventually die with his body.
Does the Daly from within the game realize this? He must.
Onto Nanette’s mission. Her real-world self breaks into Daly’s apartment and steals the DNA-covered items from the fridge. But did she need to do that when they ended up trapping Daly in his game anyway? Maybe they didn’t know that Daly would get trapped in the game and took the fridge items just to be safe.
But if that was their original plan, the real-world Daly (assuming he was able to “exit game”) could have just re-cloned his co-workers. The real world co-workers had no knowledge of the virtual hell. The same scenario would just replay itself.
I’m confused why Daly cloned Nanette at all. She was very nice and appreciative of him in the real world. I thought he only did that to people that spited him?
That being said, I can’t figure out Daly’s motive for all this. Is he a creep that preys on people he can’t be with? Is this legitimate revenge for him being mistreated or overlooked? Or is he just insane?
It has to be insane because there is no rhyme or reason why certain people make it into his space vessel. For example, the secretary that always lets him in despite the fact he doesn’t have his pass. What did she do wrong? And then the guy that brought him the wrong coffee - for real?? Get your own coffee, Daly. Those futuristic coffee machines look like you only have to press a few buttons.
But the CEO I understand why he was cloned. He treats Daly like shit. Plain and simple. But overall the writers didn’t do a good job depicting why Daly is doing what he is doing. It’s just off-the-wall bizarre.
At an hour and 16 minutes, this episode is practically a movie. Other Black Mirror episodes also clock in at over an hour, but “USS Callister” didn’t drag too much for me.
There are some language things I noticed in regards to programming and code. As a programmer I have some objections.
Nanette mentions that Daly has “beautiful, just beautiful code.” And also that it is one of the reasons she wanted to work at that company.
What does “beautiful code” even mean? I can picture what it might mean, such as nicely indented and spaced so it’s easy to read. Or perhaps the syntax and logic is so clear and obvious, that it’s familiar to those didn’t even write it. I think if Nanette provided just a couple examples, this phrase (“beautiful code”) would hit home a little more instead of feeling so flowery and over-the-top.
And the whole notion that she saw his source code before she started working there? Um. Really? Would any company release their source code to the public? Unless it’s an open-source product, not a chance.
The ending has a cool cameo from Aaron Paul (“Breaking Bad”) that lightens the mood and gets everyone back on the same page.
“King of space.”
0 notes
mattthommes-blog · 7 years ago
Text
Another
Tumblr media
While resting I’ve thought it over, how much I’ve lived and learned. How much was given and how much earned.
Despite at times misfortune, pain, down luck or happenstance, we are here now and today is a chance.
To change, believe, or let your heart sing. To be better than yesterday and tomorrow-envisioning.
And to always thank God and your lucky stars for a day like no other: Another.
- Me (2018)
1 note · View note
mattthommes-blog · 7 years ago
Text
Git Dual Branches
Tumblr media
(Update: this post is also on Codementor)
Sometimes it’s hard to have fully-functioning local and production environments, either due to legacy code or poor separation of dependencies. For example: a script that works fine in production, but has never really been tested or ran locally.
In this case you may want to use separate code for local and production in order to reduce the need to refactor everything.
I’m not suggesting this is the way to go every time; just in those very particular situations where it’s better to err on the side of caution (by testing locally) without creating excess work.
Git setup
Using git you’ll need a sort of pseudo branch that has code only for your local environment. This pseudo branch needs to allow for both local-only code changes, as well as for the bug or feature you are working on.
So, right away we can envision three separate branches:
The local changes required to work on any feature or bug
The specific feature or bug you are working on
A combination of #1 and #2 based off of #1
A really rough visual might look like this quick sketch I made in the Apple Notes app:
Branches 1 and 2 sync up with their remote origins because they contain uniquely independent code. Branch 3 syncs with 1 and 2 locally via cherry-pick (more on that in a minute) because it can only run locally. Branch 3 might have it’s own remote origin also, but it is never production (upstream)-ready code since it always has local-only changes. The only reason to push branch 3 is to retain it’s working state which is useful if you want to avoid repeat stashing and let others have visibility to your local code changes.
Branch 3 is essentially a garbage or sandbox branch, in that it will never be merged into upstream/production.
In order to get changes into their respective branches, you commit in branch 3 then cherry-pick into the other branches. This way branch 3 always has the fully functional code for the local environment, and branches 1 and 2 only contain commits relevant to each branch’s purpose. Branches 1 and 2 don’t execute locally; they exist solely as a bridge to be merged into upstream-ready code.
You can also cherry-pick from branches 1 and 2 into 3. This often happens when you need to make a minor change to the upstream-ready code that doesn’t need to be tested locally. An example being setting a timeout value higher, or adding a code comment. It’s often quicker to just make the change in the production-ready branch first, push, and continue collaborating with others, than to perform four steps every time: commit, switch, cherry-pick, push.
Cherry-picking versus merging
Merging will bring all changes from one branch into another. We absolutely do not want this to happen from branch 3 into branches 1 or 2 because branches 1 and 2 are completely independent feature or bugfix-related code. They don’t know or care about each other.
The only option is to cherry-pick individual commits from branch 3 into branches 1 and 2. Cherry-picks will create new commit hashes, which can cause weird issues down the road if there are multiple commits with the same exact changes but different hashes (and possibly authors!) but that’s not a concern because branch 3 is never merged into upstream.
More on stashing
Stashing is quick and handy, but over time your stashes will get out of control. If you have more than a few stashes, it’s easy to lose track of the purpose and branch behind each stash. I know there are creative ways to stash whereby you can organize and execute stashes more clearly, but in practice I’ve found stashing to be messy and only useful in emergencies.
The other main drawback of stashing is the inability to push stashes to remotes. If your computer dies, your stashes die with it. I don’t like that I have a bunch of unfinished and undocumented work sitting solely on my machine.
Philosophically, I’ve learned over time that I stash for really only one reason: I need to switch branches and I don’t have time to review and commit everything. The changes could be actual bug fix or features that haven’t been completely fleshed-out, or just plain debugging code.
Not having time to commit is a poor excuse to use a feature (stashes) that was most likely designed for this exact purpose: the ability to quickly switch branches without stopping to commit what you have. In this manner, stashing enables sloppy developer practices.
The benefit of a dedicated sandbox branch (#3) is that it’s a true branch with commit history even for the smallest or least-likely of changes that will make it to upstream.
The process matters.
Stop thinking of your local changes as only being temporarily important or relevant locally. Your entire coding process (building and debugging) matters, and if that’s not visible or evident in commits to others, you’re not growing as a developer.
Final thoughts
If you are not already, get used to making partial file commits (in branch #3). Through the command line this is done with git add -p <filename>. Quick primer: use y + Enter to stage a particular chunk of code, and j + Enter to ignore it. That’s it!
And because I like to get down into details, here is a more comprehensive drawing of how the branches would be set up. Below illustrates a bug fix and a feature both using dual branches.
I apologize for the crudeness here (there are a lot of arrows being thrown at you):
(I also toyed with titling this post “Git Multi-Branches or “Git Three-Tiered Projects.”)
0 notes
mattthommes-blog · 7 years ago
Text
You Need A Budget
I’ve started using the You Need A Budget service after a colleague referred me to it. It’s a personal financing service that lets you track all of your expenses and external accounts in a single interface for an easy look at your overall budget and financial picture.
My Budgeting Background
The idea of tracking every expense and forecasting future payments is nothing new to me. I used Mint for many years, and later on (to this date) I use a custom Google Sheet with scripting for added precision with my budgeting numbers.
I. Track. Everything. Every payment; every transaction. It’s become a knee-jerk habit to record every purchase just like our parents taught us at a young age when we got our first checking account. Except these days we have so many better tools than pen and paper, namely web and mobile apps.
Goals
However, even with my custom spreadsheet and super-duper formulas, I still feel I’m missing important information and awareness about my spending habits, as well as effectively putting my dollars to work. For example, am I saving and investing enough? Are there categories where I’m spending too much? Most importantly, how much actual money do I have right now for something I might need?
It’s that last point that my current tools are not revealing. I never actually know how much spare money I have to use for something, and to not feel guilty about it.
I hope to achieve some added clarity with You Need A Budget (referred to as YNAB from this point forward). I’ve only been using the service for a few months, but here are my thoughts on YNAB and how my transition from an ad-hoc approach is coming along.
Referral
First, it was nice to have a colleague promote this service to me in person which made me more excited to try it. We talked a lot about our current budgeting practices and what makes it most valuable for us. We also each get a free month because of the referral (FYI: you can be my referral if you also want the free month).
I know this is not possible for everyone, but if you know someone that uses the service or a similar one, it is helpful to discuss their approach and your own thoughts on budgeting in general. This will get you in the right mindset to trying something new like YNAB which does require a certain level of commitment.
Design and Interface
The user interface of YNAB is fluid and responsive, and works in desktop browsers as well as a native mobile apps. The web app feels like it’s from 2017 for sure. The mobile app (I’ve only tried it on iOS) is also intuitive and fits a lot of features into a smaller interface without cluttering things or becoming too overwhelming.
One important thing that I noticed is I don’t feel like I am editing a boring spreadsheet, nor do I get too lost in all the numbers, since most user interaction involves inputting numbers. The interface is lightweight and there is very little friction.
Setup and Early Stages
When you use YNAB it’s best to connect your external bank accounts so the service can automatically import every transaction. This initially made me stop and think. Having to hand over my login information and 2-factor authorization for every bank I use was a bit concerning at first especially with all the cyber-hacking going on these days.
I decided I had to either commit to this willful breach of privacy or forgo using the service entirely (and give up tracking my banking activity). I decided to trust YNAB and give it a shot.
Also, it is not absolutely required to connect all of your external banking accounts but it does save time because then you don’t have to constantly be checking each account for transactions.
You’d be surprised at how many accounts and transactions you actually have. For example, I track all of my investment accounts including 401(k) as well as all those random credit accounts for merchants or stores that I opened over the years that I hardly thought about prior to YNAB other than remembering (or forgetting!) to pay my bill once a month.
At the very least, YNAB provides visibility that you may not have had before.
I then had to go through and adjust all of the predefined categories to ones that actually made sense for me. To use those categories after a day or two when all of my connected bank accounts started importing transactions into YNAB, I had to go through the backlog and categorize all of those transactions. This might have been the most tedious part.
Finally, much of what I did in the early stages was to really learn how the service works and the philosophy behind it. Without a firm grasp of this knowledge, it would be extremely hard to utilize the service to the best of its abilities. Thankfully, the documentation and timely email marketing information is very well done and put together perfectly for new users to learn and get excited.
Building Upon the Foundation
Now that I’ve been using YNAB for about three months I have started to learn some tips and tricks that have greatly simplified how I use the service.
Savings Accounts
For example, initially I connected my savings account which I don’t actively use other than putting some money in there from time to time, and withdrawing funds for unexpectedly large payments. YNAB actually suggests connecting your savings account(s) so the service has visibility to all of your available funds and can properly put them to work.
However, doing this caused my “To be budgeted” total to be inflated to the point of not being meaningful to me for the short-term. Right now I feel that I only want to see my checking account activity because that’s my main account for money flowing in and out. Long-term it makes sense to connect my savings account so I can put that money to work, but that is something I will try another day.
Understanding Tracking Accounts
This is something that took me too long to figure out (and I still might not fully understand it). Credit accounts that have an on-going balance, or any account where a merchant is expecting money from you to pay down an outstanding balance (such as the dentist, hospitals, the hardware store, etc) have to be tracked separately from your main categories. Using a tracking account lets you correlate transactions so you always see the latest balance and can set goals to pay down the balance more easily or frequently.
One way I utilize tracking accounts is I consider them as large payments where I don’t owe the full balance all at once, and can make smaller payments over time to pay down the outstanding balance. This is different from, for example, a consistent monthly payment like my mortgage that I absolutely owe the full amount every month.
As I mentioned before, the best part about the service and tracking accounts in general is the visibility it provides to all of your outstanding balances that you have scattered around.
Amazon or Target Purchases
I’ve noticed Amazon.com and Target purchases are difficult to handle for a few reasons. I’ll focus on Amazon but the same applies to Target, or any store that carries products across different categories.
Amazon groups together items based on shipping which causes multiple charges
Most orders span multiple budget categories as a single purchase
My credit card charges sometimes appear different than what Amazon shows as the final price
Any rewards points I apply to orders further mess up the true totals that each item cost
What I’ve been doing to handle this is to manually break down each Amazon order in other system (like a spreadsheet) and tally up the total cost per budget category, then enter that into YNAB. Then when the actual credit card charges come through, you have to remember to delete those from YNAB because (if you’re a good budgeter) you should have already entered the expenses right after placing the Amazon order.
I’ve also started avoiding using rewards points if I still have budget room because it becomes near impossible to determine the true cost of each item when you apply a random rewards dollar amount. I could divide the number of items from the total order amount, but that assumes each item cost the same, which is hardly ever true.
This is something I’m still fine-tuning each month, and maybe someday I’ll have a more solid approach.
Closing Thoughts
Over the next few months of using YNAB I plan to really focus hard on each of my budgeting categories and determine where money is leaking out too easily so I can cut costs.
As the service promotes, having a budget is not about restriction but about enabling more visibility and empowerment of your money, and freeing yourself of financial stress. It’s more of a mindset than it is just software calculations.
Don’t worry if you don’t grasp it all at first, or find it hard to stick to a particular budget. It’s all about setting up the pattern and habits that will help you become more aware of your spending habits, and provide peace of mind. At the very least, just going through the routine of checking your budget before making a purchase is a step in the right direction.
If you’ve read this far and are thinking of signing up, feel free to use my referral link to get us both a free month of the service.
0 notes
mattthommes-blog · 8 years ago
Text
Thoughts on "13 Reasons Why" (Netflix)
This is a controversial, uncomfortable, and heart-wrenching show to watch, although well acted and portrayed, and some great music at that! I had a hard time getting through most episodes. The topics (suicide, rape, alcoholism, divorce, peer pressure, and more) are extremely serious especially for high school kids.
The general danger depicted with this show is that suicide is an effective way to have your voice heard. But I think it's clear after watching that the outcome of that choice isn't as effective as it may have been envisioned by Hannah.
Viewers should easily realize there is nothing glamorous in taking your own life because of how others made you feel. You are far more effective in life than in death where you are soon forgotten by most outside of those close to you.
The tapes are an effective medium (albeit ancient technology but perhaps that added to their charm) for narrating the show because the viewers and Clay alike can follow along in real-time. The tapes reveal Hannah as a compelling story teller with an ability to set the pace and keep listeners in anticipation.
But one should wonder how someone with such amazing story-telling skills wouldn’t be able to see the big picture. She’s sharing the big picture but not seeing her own big picture. If she has such a great perspective on everything, why didn’t she recognize her own growth and maturity as she calmly described what has happened to her? She’s smarter than that. She’s smarter than suicide.
But... here we are. Without answers. Just blame. In the end you can’t target one individual for the demise of Hannah. That’s not fair especially since only one person decided to take her life.
Neither side is right. Hannah (and only Hannah) made the choice to end her life. She can blame whomever she wants, but no one but her did this to herself. However, it’s hard not to acknowledge the carelessness on the part of many important role players that Hannah chose to surround herself with.
For example, the counselor (Mr. Porter) could have been more proactive after learning about what was going on, rather than sitting back and waiting for students to approach him and “talk” in what felt like therapy sessions.
Tony’s attempt to keep Hannah’s honor was noble, but still poor judgement. Surely a lightbulb would have went on that made him realize the amount of damage control he would have to perform would be far more work than if he simply came forward with what he knew earlier on.
Clay’s helicopter parents should have been more in-tune to their son’s pain and suffering. I realize Clay isn’t exactly the “opening up” and “feelings” type, but his parents detachment was painful to witness. Also, I think this is fairly obvious but they should not have gotten involved in a legal situation involving their own son possibly playing a role.
Bryce is just a dirtbag that has it coming. The show ends with the assurance that he will be prosecuted for his crimes.
Finally, although this is after the fact, all of the tape recipients should have reported them to their parents or authorities rather than keep it hush. I can certainly forgive the decisions of naive high school students, but one must wonder if Alex would have been better off without all those secrets weighing him down for so long.
In the end, despite her choice to end her life, Hannah’s voice needs to be heard. Her words matter and she deserves the podium to speak, albeit for only a short time as the tapes must end.
Let this not be a lesson that it's okay to use suicide as a way to get back at those who hurt you, but instead to recognize that we need to be kinder to each other, and to take action when something is noticed.
Random side notes and thoughts
On a lighter note, some random things that didn’t really fit anywhere else, but I wanted to share.
The present has a cold and blue-ish tint. The past is bright with saturated colors.
I typically dislike shows that jump back and forth in time, but this show seamlessly blended the timeframes so well, it is uncanny. The scenes where some past conversation took place, moment experienced, or physical location Clay was at morphed into the present time were my favorite. I find myself doing the same thing in my own life.
I wish they’d show Hannah behind the microphone more. We see it in the very beginning but then it never happens again. After a while it just feels more like she’s truly narrating the story as opposed to tapes being heard by Clay.
I felt Jeff’s death was unnecessary. Did we really need another death in this story? As if Clay hasn’t gone through enough, the writers had to include that.
After a while I felt the school scenes getting old. It was the same tired old characters in the same hallway scenes.
0 notes