Full Width [alt+shift+f] Shortcuts [alt+shift+k]
Sign Up [alt+shift+s] Log In [alt+shift+l]
24
Optionality’s one of those things you don’t really think about. People don’t generally wake up one morning thinking “Why, it appears I’ve spent the past several decades of my life optimizing for optionality. Perhaps I should figure out why?”. Most don’t even recognize the term – until it’s already explained to us. If you’re one of those people, this could well be the most important posts you read this year. What Is Optionality? Optionality has been drilled into our heads ever since we were young. No one calls it that, but every one of us has heard the advice to follow opportunities that “open up doors” or “unlock opportunities” down the road. Now that’s all fine and dandy when you’re 12, but our generation is increasingly becoming crippled by the abundance of choices – making it damn near impossible to decide on anything of significance anymore. That’s tragic because optionality is also a privilege. And this disease has a tendency to afflict the most privileged among us – rendering...
over a year ago

Improve your reading experience

Logged in users get linked directly to articles resulting in a better reading experience. Please login for free, it takes less than 1 minute.

More from Yazin Alirhayim

How do you know that an API does what it says it does?

Having been in fintech for a while, I’ve noticed something in common between the many new startups that come and go. They all require access to personal information. A specific example that comes to mind is the Plaid-like solution we developed while working on amal. We’d ask customers for their bank credentials[ajy] and then proceed to login on their behalf in order to share the resulting account information with the 3rd party application they are using (e.g. for transferring money, tracking their spending, etc). I’ve noticed similar things with companies that try to optimize the checkout experience – almost always by becoming the interface layer that users use, necessarily being exposed to sensitive cardholder information like the card number, CVC and even PIN number in some instances[axo]. The problem in all of these situations is that these apps require users to trust them, but provide no means for verification that this trust is not misplaced. “Trust, but verify” — Russian proverb Is there a better way? Some Assumptions Many throw their hands in the air and point to the protectionist practices of financial institutions that prevent data sharing — without APIs, the only real option for authenticating users is with the same credentials they use themselves. To explore better ways forward, let’s make a few assumptions (and eliminate thorny edge cases that frontload a lot of complexity): The application handles sensitive data It performs a deterministic task (i.e. same inputs result in the same output) It does not rely on state The application doesn’t keep logs (or retains anonymized and desensitized logs to aid in debugging) What we’re after Let’s be clear about what we’re after. If an app holds the assumptions we set earlier, then we should be able to use that app in a way that allows independent third parties to verify that the app is doing exactly what it says it’s doing. In the case of a checkout app for instance, we should be able to verify that it’s not stealing customer’s card details and siphoning them off to the Russian mafia. Front-end applications This is simple-enough to do, to some extent, on front-end applications – because we can inspect the code ourselves (albeit, obfuscated code to an increasing degree). Still, worst case we’d still be able to track network requests being made from the application – as well as any usage of local storage to ensure there’s nothing fishy going on. Backend But what about the backend? They are completely opaque to anyone outside the server; true black-boxes, where only the inputs and outputs can be observed, but not what’s performed inside. This is exacerbated by the fact that front-ends are also the front-lines of the war against all sorts of user-side attacks (CSRF, poisoning, etc). This has resulted in things like CORS, that prevent clients from making HTTP requests that would otherwise work completely fine on backends. Options For Greater Transparency 1. Fatter front-end’s for security [ajy] It’s so sad that it’s come to this. Sharing bank credentials with 3rd parties should never be ok, and yet it seems to be the only practical way that third party apps can communicate with financial institutions.

over a year ago 22 votes
Braindump

Been having a hard time lately focusing. It’s like whenever I start doing anything of any significance I get derailed, and fall into this spiral of thought where I reconsider whether what I’m about to do matters, why it would, and whether I could be doing something else that would be more “productive”. The end result is that I end up doing nothing (no, the irony is not lost on me). This is a strange state for me to be in, because it isn’t one I recall having gone through before. I’m usually able to operate at a high cadence, get stuff done and just generally apply myself to projects with high autonomy and little structure. I think it may have something to do with the overall situation around COVID, and that I’ve been effectively operating indoors for the past 9 months (!). Cafes, restaurants and most public places are still take-out only, so this makes it difficult to hang out in person (if you’re not working at an office). I don’t know if these are symptoms of depression, or if they are just general apathy resulting from severely diminished social contact. Maybe it’s a bit of both? Again, don’t recall ever having going through a “proper” episode of depression before, so I’m unsure it is in fact that. I was reading about it on Wikipedia yesterday and came across an article describing negative self-talk, something I definitely encounter alot more as of late. The article suggested Cognitive Behavioral Therapy (CBT) as a solution (in addition to exercise, which I do a few times a week already). CBT is a program often run by a counselor (in-person) and involves examining the Behavior, Thoughts and Feelings of a subject in order to pinpoint the specific behavioral pattern that needs to be changed (either intensified, or diminished). This all sounds great in theory, but finding a therapist that I trust to do this sounds like a real chore - especially in Bahrain. I’ve found online providers that delivery virtual therapy; I’ve also read that CCBT - Computerized CBT (delivered primarily via apps) can be effective if used consistently. And so that’s what I’m doing now - using an app called MoodKit (iOS only) that sends me occasional triggers to jot down what I’m thinking, and walks me through the process of assessing my thoughts to see if they’ve fallen victim to “distortions” (yes, you bet they have!). I’ll report back once I’ve had at least a few weeks of experience with it and let you know how it all went. Of course, I don’t plan to just sit around all day while I wait to get better. I want to apply myself, to express myself creatively, and make something useful. But that’s the operative word: “something”. Like, “one thing”. Not 500.

over a year ago 25 votes
Getting started with Flutter

It used to be that you needed to know Kotlin and Swift to develop apps for both Android and iOS, but those days are long gone. Even the fundamental reasons for doing so have changed — some sort of compromise between performance and speed to deployment. React Native apps were kinda slower than native apps by a smidge, but with the introduction of Flutter — that difference was wiped out almost entirely. With Flutter, you get native app performance because you leave HTML and JS behind. Getting the Basics Flutter has an excellent reference for web developers that I found more useful than alot of the intro guides out there. I don’t need to know what a variable or for loop is — just tell me the concepts I need to hit the ground running. Coupled with this brief high level overview it’s pretty much all you need to understand Flutter conceptually. Getting up and running with Flutter, quickly A great place to start was to quickly paste snippets from the web developer article I mentioned above into DartPad and see the results immediately. This gave me a feel for how things works in Flutter land, without fretting too much about setting everything up locally. A+ Resources Build a sick planet app from scratch. No fluff, all goodness. Loved recreating this myself. Flutter Layout cheat sheet Build a functional Startup Name Generator, start to finish, from scratch Comprehensive reference for more great resources on Flutter 👉 Stay tuned for my first app on Flutter, in a future post!

over a year ago 23 votes
The best bank in Bahrain … is Meem

Yes, that’s right. The best bank in Bahrain is … Meem. This nomination will be especially shocking to those of you that read my last post that ripped the Meem app to shreds. Criteria for ‘best bank’ My criteria for “best bank” isn’t the best user experience or customer support. It’s all about the best bank for buck. There are two main parts to this: What’s the best cashback rate I can get back on my spending? What’s the best profit rate I can get back on my deposits? While I always limit myself to shariah-compliant options, you’ll soon see that the rates Meem offer are actually superior to even the non-compliant options in Bahrain. Cashback 💳 I’m always befuddled when I’m standing in line at the cashier and see the person in front of me whip out a debit card. Why on earth are you paying with a debit card?? Paying with a credit card that has Cashback is literally free money (assuming, of course, that you pay the bill in full at the end of each month). Here are the cashback rates for the Meem credit card[1]: 1% cashback for spending below BD 500 a month 2% cashback for spending between BD 500 — BD 1000 a month 3% cashback for spending above BD 1000 a month (capped at BD 50) Take a second here to recognize how insanely good these rates are! Not just at the local or regional level … even globally. You’d have a hard time finding a card that offers more than 2% cashback in the US; see for yourself[2]. As for Bahrain, no bank even comes close. Here are the cashback rates for a sample of popular Bahrain banks: Ithmaar Bank — 0.2% NBB — 0% Credimax — 0% on local purchases; 1% on international Not. Even. Close. I hit the 3% rate consistently with Meem (since I use my card for paying alot of my online business bills), and this means BD 50 of free money each month, or BD 600/yr. Nuts! Return on deposits 💰 These are typically known in the industry as “fixed-term deposits” (or Fixed Deposits). This means locking up your money for a fixed period between 1 month and 1 year, with a guaranteed rate of return (always quoted per year, regardless of the term you pick). While fixed deposits are not Sharia compliant, Murabaha is — a variant where you purchase something from the bank (usually a commodity, like cement) and sell it back for a profit at the end of the term. Once again, the rates Meem offer are higher than anything I’ve seen offered by any other bank in Bahrain. Fixed deposits are tricky to compare since the rates change during the year (with the change in the base rate by the CBB), and they also vary by currency. Here are the rates for Meem in January, 2020[3]: 2.33% on USD (90 day term) — no minimum 1.17% on BHD (90 day term) — no minimum Obviously, huge difference between BHD and USD — and so you’re better off converting to USD when you deposit. Meem makes this easy by offering multicurrency accounts (the BHD/USD rate is capped by the CBB; Meem provides a significantly better rate of 0.3765 BHD/USD vs the 0.375 BHD/USD that most banks in Bahrain provide). So, 2.33% for Meem. Let’s compare to a few other banks in Bahrain, shall we: KFH: 1.85% BHD (90 day terms) — BD600 min. Citi: 1.75% BHD / 0.85% USD (90 day terms) UPDATE: A friend tipped me off to Jazeel, a Digital Bank launched by KFH, that offers Wakala rates that match Meem’s USD rates but for BHD[4]. Details: KFH Jazeel: 2.3% BHD (90 day terms) — BD1000 min. If you can meet the BD 1,000 minimum then they’d be a better option for BHD deposits than Meem’s. I’m unable to provide more links to banks in Bahrain, because they don’t share the rates online. To my knowledge, the rates are less competitive than those of KFH cited above (and Meem, of course). If you’ve got more numbers for me to include, please let me know. Conclusion Using Meem’s financial products can earn you: BD 600 / year in cashback BD 23 / year for every BD 1,000 you deposit (on a USD denominated Murabaha deposit @ a 90 day term) That’s better than every other bank in Bahrain I’ve come across, and they are Sharia compliant. There you go, folks — you’re welcome! Share this post around if you found it useful. 👣 Footnotes [1] Meem isn’t very forthcoming on their website about the cashback rate, simply saying that they offer “up to 3% cashback” on credit card purchases. Their app provides the breakdown that I shared. [2] Any rates over 2% are usually guarded with multiple qualifiers limiting their utility specifying either merchants or a specific category that is included, and always capped at a very low yearly amount. [3] Not shared on their website, but available in the app. Screenshots below: [4] Not shared on their website, but available in the app. Screenshots below:

over a year ago 29 votes

More in technology

You should repaste your MacBook (but don't)

My favorite memory of my M1 Pro MacBook Pro was the whole sensation of “holy crap, you never hear the fans in this thing”, which was very novel in 2021. Four years later, this MacBook Pro is still a delight. It’s the longest I’ve ever owned a laptop, and while I’d love to pick up the new M4 goodness, this dang thing still seems to just shrug at basically anything I throw at it. Video editing, code compiling, CAD models, the works. (My desire to update is helped though by the fact I got the 2TB SSD, 32GB RAM option, and upgrading to those on new MacBooks is still eye wateringly expensive.) But my MacBook is starting to show its age in one area: it’s not quiet anymore. If you’re doing anything too intensive like compiling code for awhile, or converting something in Handbrake, the age of the fans being quiet is long past. The fans are properly loud. (And despite having two cats, it’s not them! I clean out the fans pretty regularly.) Enter the thermal paste Everyone online seems to point toward one thing: the thermal paste on computers tends to dry up over the years. What the heck is thermal paste? Well, components on your computer that generate a lot of heat are normally made to touch something like a copper heatsink that is really good at pulling that heat away from it. The issue is, when you press these two metal surfaces against each other, even the best machining isn’t perfect and you there’s microscopic gaps between them meaning there’s just air at those parts, and air is a terrible conductor of heat. The solution is to put a little bit of thermal paste (basically a special grey toothpaste gunk that is really good at transferring heat) between them, and it fills in any of those microscopic gaps. The problem with this solution is after hundreds and hundreds of days of intense heat, the paste can dry up into something closer to almost a powder, and it’s not nearly as good at filling in those gaps. Replacement time The logic board! MacBook thermal paste isn’t anything crazy (for the most part, see below), custom PC builders use thermal paste all the time so incredibly performant options are available online. I grabbed a tube of Noctua NT-H2 for about $10 and set to taking apart my MacBook to swap out the aging thermal paste. And thankfully, iFixit has a tremendous, in depth guide on the disassembly required, so I got to it. Indeed, that grey thermal paste looked quite old, but also above and below it (on the RAM chips) I noticed something that didn’t quite seem like thermal paste, it was far more… grainy almost? Spottiness is due to half of it being on the heatsink It turns out, ending with my generation of MacBooks (lucky me!) Apple used a very special kind of thermal compound often called “Carbon Black”, which is basically designed to be able to bridge an even thicker gap than traditional thermal paste. I thought about replacing it, but it seems really hard to come across that special thermal compound (and do not do it with normal thermal paste) and my RAM temperatures always seemed fine (65°C is fine… right?) so I just made sure to not touch that. For the regular grey thermal paste, I used some cotton swabs and isopropyl alcohol to remove the dried up existing thermal paste, then painted on a bit of the new stuff. Disaster To get to the underside of the CPU, you basically need to disassemble the entire MacBook. It’s honestly not that hard, but iFixit warned that the fan cables (which also need to be unclipped) are incredibly delicate. And they’re not wrong, seriously they have the structural integrity of the half-ply toilet paper available at gas stations. So, wouldn’t you know it, I moved the left fan’s cable a bit too hard and it completely tore in half. Gah. I found a replacement fan online (yeah you can’t just buy the cable, need a whole new fan) and in the meantime I just kept an eye on my CPU thermals. As long as I wasn’t doing anything too intensive it honestly always stayed around 65° which was warm, but not terrifying (MacBook Airs completely lack a fan, after all). Take two A few days later, the fans arrived, and I basically had to redo the entire disassembly process to get to the fans. At least I was a lot faster this time. The fan was incredibly easy to swap out (hats off there, Apple!) and I screwed everything back together and began reconnecting all the little connectors. Until I saw it: the tiny (made of the same half ply material as the fan cable) Touch ID sensor cable was inexpicably torn in half, the top half just hanging out. I didn’t even half to touch this thing really, and I hadn’t even got to the stage of reconnecting it (I was about to!), it comes from underneath the logic board and I guess just the movement of sliding the logic board back in sheared it in half. me Bah. I looked up if I could just grab another replacement cable here, and sure enough you can… but the Touch ID chip is cryptographically paired to your MacBook so you’d have to take it into an Apple Store. Estimates seemed to be in the hundreds of dollars, so if anyone has any experience there let me know, but for now I’m just going to live happily without a Touch ID sensor… or the button because the button also does not work. RIP little buddy (And yeah I’m 99.9% sure I can’t solder this back together, there’s a bunch of tiny lanes that make up the cable that you would need experience with proper micro-soldering to do.) Honestly, the disassembly process for my MacBook was surprisingly friendly and not very difficult, I just really wish they beefed up some of the cables even slightly so they weren’t so delicate. The results I was going to cackle if I went through all that just to have identical temperatures as before, but I’m very happy to say they actually improved a fair bit. I ran a Cinebench test before disassembling the MacBook the very first time to establish a baseline: Max CPU temperature: 102°C Max fan speed: 6,300 RPM Cinbench score: 12,252 After the new thermal paste (and the left fan being new): Max CPU temperature: 96°C Max fan speed: 4,700 RPM Cinbench score: 12,316 Now just looking at those scores you might be like… so? But let me tell you, dropping 1,600 RPM on the fan is a noticeable change, it goes from “Oh my god this is annoyingly loud” to “Oh look the fans kicked in”, and despite slower fan speeds there was still a decent drop in CPU temperature! And a 0.5% higher Cinebench score! But where I also really notice it is in idling: just writing this blog post my CPU was right at 46°C the whole time, where previously my computer idled right aroud 60°C. The whole computer just feels a bit healthier. So… should you do it? Honestly, unless you’re very used to working on small, delicate electronics, probably not. But if you do have that experience and are very careful, or have a local repair shop that can do it for a reasonable fee (and your MacBook is a few years old so as to warrant it) it’s honestly a really nice tweak that I feel will hopefully at least get me to the M5 generation. I do miss Touch ID, though.

2 days ago 5 votes
Six Game Devs Speak to Computer Games Mag (1984)

Meet the Creators of Choplifter, Wizardry, Castle Wolfenstein, Zaxxon, Canyon Climber, and the Arcade Machine

2 days ago 4 votes
New AWS x Arduino Opta Workshop: Connect your PLC to the Cloud in just a few steps

We’re excited to invite you to a brand-new workshop created in collaboration with Amazon Web Services (AWS). Whether you’re modernizing factory operations or tinkering with your first industrial project, this hands-on workshop is your gateway to building cloud-connected PLCs that ship data – fast. At Arduino, we believe in making advanced technology more accessible. That’s […] The post New AWS x Arduino Opta Workshop: Connect your PLC to the Cloud in just a few steps appeared first on Arduino Blog.

2 days ago 3 votes
The History of Acer

A Shy Kid Builds the Taiwanese Tech Industry

5 days ago 11 votes
Concept Bytes’ coffee table tracks people and walks itself across a room when called

The term “mmWave” refers to radio waves with wavelengths on the millimeter scale. When it comes to wireless communications technology, like 5G, mmWave allows for very fast data transfer — though that comes at the expense of range. But mmWave technology also has some very useful sensing and scanning applications, which you may have experienced […] The post Concept Bytes’ coffee table tracks people and walks itself across a room when called appeared first on Arduino Blog.

5 days ago 8 votes