Full Width [alt+shift+f] Shortcuts [alt+shift+k]
Sign Up [alt+shift+s] Log In [alt+shift+l]
32

Prescription Form UI Improvements

from bt RSS Feed [alt+shift+b] in programming

Prescription Form UI Improvements 2019-03-13 I was browsing the Clearly website a few days ago and ended up using their prescription form to update my worsening eyesight. The design of this form wasn’t bad per se, but it could certainly be improved. Current design of the prescription view As I stated, this design isn’t horrible by any means, but right away we can notice some problems: the layout causes the users’ eyes to jump between left-to-right and top-to-bottom without good correlation title content and next buttons are centered, while dropdowns are presented as left-to-right anchor link coloring is inconsistent too much whitespace between interactive sections dropdown height overly large Starting to make some changes Let’s tackle these problems one at a time. First, we want a more defined page layout so the user can scan through the content more easily (left-to-right, down to the next line, then repeat). We have now left-aligned the title content to be flush with the OD/OS elements below it to help keep the reading flow consistent. The previous layout also had the PD in-line with the OD/OS element rows which created a problem of resetting the user thought-process. Since it requires the user to jump from the “right eye” option to the “PD” option, then back to “left eye” option it breaks the flow of user “tasks”. The new UI shifts the PD down into it’s own row, grouping the unrelated tasks on the page separately. You’ll also notice that I’ve updated the dropdowns to use a monospace font to convey that these options are number inputs. Finally we place the button actions in-line with the PD block since it previously ate up far more real estate than was necessary. Adding some color The original design has some inconsistencies with the link coloring - some being a muted grey while others use the accented blue. Updating all interactive links to use Clearly’s default blue accent color would make for a better disconnect from non-interactive elements. Finishing...
13th Mar 2019

Stay updated

Get a weekly newsletter with the top 5 articles worth reading every week.

More from bt RSS Feed

Installing OpenBSD on Linveo KVM VPS

Installing OpenBSD on Linveo KVM VPS 2024-10-21 I recently came across an amazing deal for a VPS on Linveo. For just $15 a year they provide: AMD KVM 1GB 1024 MB RAM 1 CPU Core 25 GB NVMe SSD 2000 GB Bandwidth It’s a pretty great deal and I suggest you look more into it if you’re interested! But this post is more focused on setting up OpenBSD via the custom ISO option in the KVM dashboard. Linveo already provides several Linux OS options, along with FreeBSD by default (which is great!). Since there is no OpenBSD template we need to do things manually. Getting Started Once you have your initial VPS up and running, login to the main dashboard and navigate to the Media tab. Under CD/DVD-ROM you’ll want to click “Custom CD/DVD” and enter the direct link to the install76.iso: https://cdn.openbsd.org/pub/OpenBSD/7.6/amd64/install76.iso The "Media" tab of the Linveo Dashboard. Use the official ISO link and set the Boot Order to CD/DVD. Select “Insert”, then set your Boot Order to CD/DVD and click “Apply”. Once complete, Restart your server. Installing via VNC With the server rebooting, jump over to Options and click on “Browser VNC” to launch the web-based VNC client. From here we will boot into the OpenBSD installer and get things going! Follow the installer as you normally would when installing OpenBSD (if you’re unsure, I have a step-by-step walkthrough) until you reach the IPv4 selection. At this point you will want to input your servers IPv4 and IPv6 IPs found under your Network section of your dashboard. Next you will want to set the IPv6 route to first default listed option (not “none”). After that is complete, choose cd0 for your install media (don’t worry about http yet). Continue with the rest of the install (make users if desired, etc) until it tells you to reboot the machine. Go back to the Linveo Dashboard, switch your Boot Order back to “Harddrive” and reboot the machine directly. Booting into OpenBSD Load into the VNC client again. If you did everything correctly you should be greeted with the OpenBSD login prompt. There are a few tweaks we still need to make, so login as the root user. Remember how we installed our sets directly from the cd0? We’ll want to change that. Since we are running OpenBSD “virtually” through KVM, our target network interface will be vio0. Edit the /etc/hostname.vio0 file and add the following: dhcp !route add default <your_gateway_ip> The <your_gateway_ip> can be found under the Network tab of your dashboard. The next file we need to tweak is /etc/resolv.conf. Add the following to it: nameserver 8.8.8.8 nameserver 1.1.1.1 These nameservers are based on your selected IPs under the Resolvers section of Network in the Linveo dashboard. Change these as you see fit, so long as they match what you place in the resolve.conf file. Finally, the last file we need to edit is /etc/pf.conf. Like the others, add the following: pass out proto { tcp, udp } from any to any port 53 Final Stretch Now just reboot the server. Log back in as your desired user and everything should be working as expected! You can perform a simple test to check: ping openbsd.org This should work - meaning your network is up and running! Now you’re free to enjoy the beauty that is OpenBSD.

21st Oct 2024 • 96 votes
Burning & Playing PS2 Games without a Modded Console

Burning & Playing PS2 Games without a Modded Console 2024-09-02 Important: I do not support pirating or obtaining illegal copies of video games. This process should only be used to copy your existing PS2 games for backup, in case of accidental damage to the original disc. Requirements Note: This tutorial is tailored towards macOS users, but most things should work similar on Windows or Linux. You will need: An official PS2 game disc (the one you wish to copy) A PS2 Slim console An Apple device with a optical DVD drive (or a portable USB DVD drive) Some time and a coffee! (or tea) Create an ISO Image of Your PS2 Disc: Insert your PS2 disc into your optical drive. Open Disk Utility (Applications > Utilities) In Disk Utility, select your PS2 disc from the sidebar Click on the File menu, then select New Image > Image from [Disc Name] Choose a destination to save the ISO file and select the format as DVD/CD Master Name your file and click Save. Disk Utility will create a .cdr file, which is essentially an ISO file Before we move on, we will need to convert that newly created cdr file into ISO. Navigate to the directory where the .cdr file is located and use the hdiutil command to convert the .cdr file to an ISO file: hdiutil convert yourfile.cdr -format UDTO -o yourfile.iso You’ll end up with a file named yourfile.iso.cdr. Rename it by removing the .cdr extension to make it an .iso file: mv yourfile.iso.cdr yourfile.iso Done and done. Getting Started For Mac and Linux users, you will need to install Wine in order to run the patcher: # macOS brew install wine-stable # Linux (Debian) apt install wine Clone & Run the Patcher Clone the FreeDVDBoot ESR Patcher: git clone https://git.sr.ht/~bt/fdvdb-esr Navigate to the cloned project folder: cd /path/to/fdvdb-esr The run the executable: wine FDVDB_ESR_Patcher.exe Now you need to select your previously cloned ISO file, use the default Payload setting and then click Patch!. After a few seconds your file should be patched. Burning Our ISO to DVD It’s time for the main event! Insert a blank DVD-R into your disc drive and mount it. Then right click on your patched ISO file and run “Burn Disk Image to Disc...". From here, you want to make sure you select the slowest write speed and enable verification. Once the file is written to the disc and verified (verification might fail - it is safe to ignore) you can remove the disc from the drive. Before Playing the Game Make sure you change the PS2 disc speed from Standard to Fast in the main “Browser” setting before you put the game into your console. After that, enjoy playing your cloned PS2 game!

2nd Sep 2024 • 96 votes
Perspective

Perspective 2024-08-06 I recently read both Starting Hospice and No Salt posted on Jake’s blog and was quite moved. I don’t know Jake and have never met him - but his writing and shared experiences give a very real look into his mind and perspective. If you haven’t yet, I strongly recommend giving his site a read (or at the very least those two posts). It made me reflect on my own life, shift my perspective and realize how fortunate I truly am. Losing Focus I think we all find ourselves losing focus on the truly important things in life. That’s normal and expected. Maybe your house needs repairs, or you’re crunching for an upcoming deadline, or your prepping for a long a work trip, or your stressed out hunting for a job. Whatever it might be, our brains are very good at getting derailed and putting all our attention into less important things. But I believe our minds need to wander and focus on the less important. Otherwise your mental health would suffer greatly. And I should note, some of these “stresses” still require our attention. I just don’t think they should consume us. I’m not advocating that we need to constantly be obsessing over the limited time we have on this spinning rock, or that we should smother our families with over-the-top love. Just stopping and reflecting on these things can really put any worries you have into perspective. It might be cliche to state the obvious, “Be grateful for what you have!” but cliche or not - it’s true. Jake will be leaving behind not just his friends and family, but also his wife who is 7-months pregnant. I can’t begin to imagine the range of emotions everyone close to him must be feeling. I know I would be furious, which doesn’t make sense since something like this is so far removed from human control. Being angry would just be wasted energy. But that’s easier said than done. I don’t have a whole lot else to say on the matter. This post also pales in comparison to Jake’s actual experience and shared perspective on his site. I really wasn’t even sure to share this on my site, in fear that I would be somehow disrespecting Jake’s memory (along with his much better writing skills and openness). But then I thought, if anything, I could help reach Jake’s story to even one other person and help them reflect on their own perspective as well. Now if you’ll excuse me, I’m going to take a long, purposefully slow walk with my family.

6th Aug 2024 • 47 votes
Dual Booting OpenBSD and Alpine Linux on a X220 ThinkPad

Dual Booting OpenBSD and Alpine Linux on a X220 ThinkPad 2024-07-10 I’ve always found it useful to run both OpenBSD and some form of Linux variation on my personal machines. Most times, I would default to running one OS on bare metal, while the other would simply live in a VM. This works okay but I prefer my operating systems having a “hardware separator” - if that makes sense? So, I set off to start dual booting both OpenBSD and Alpine Linux on my X220 ThinkPad. I should mention that I planned to write this blog post a couple weeks ago, but the original Dogfish mSATA SSD I ordered wasn’t compatible with my X220 (even though they say it is supported…). Luckily, I found a replacement drive in one of my “computer parts” drawer. Hoarding tech always prevails! The original Dogfish mSATA slotted in the X220. Too bad it didn't work... I came across my old Raspberry Pi 400, which I previously wrote about when stuffing an SSD inside it, and proceeded to gut the drive. It’s a cheap KingSpec SSD with a whopping 64GB of storage space. But that didn’t matter since the plan was to install the wonderfully small Alpine Linux. 64 GB would be plenty of space for us! Getting Started I already had the Alpine Linux ISO installed on a random thumb drive, so that made things quicker right off the bat. The next step was opening up my X220 and slotting in the very tiny mSATA. This introduced the first minor issue: the drive was too small. I could have looked into something more “professional-looking” in order to seat the drive properly but I decided to stick with electrical tape. Get it?… After applying the tape I closed the machine back up. The KingSpec mSATA slotted in the X220 and secured with top-of-the-line electrical tape... Installing Alpine Linux Next, I needed to tell the BIOS to boot into my thumb drive containing the Alpine ISO. Once the proper order was set, I rebooted the machine and ran through the standard Alpine installer. No problems to report there. My X220 booting into the Alpine ISO thumb drive The Alpine Linux installer showing both disk options for installation destination. SDA is currently running OpenBSD. Once that was done, I rebooted the machine, being sure to remove the thumb drive and set the BIOS order to point to the new mSATA disk. Then I ran through my personal Alpine Suck installer to get my go-to applications installed alongside my dwm desktop environment. Again, no problems to report during this process. Alpine Linux running my personal `dwm` setup. Absolutely beautiful. Extras? That’s really it. Nothing super interesting to report, but that seems to be the running theme with these older ThinkPad machines: they were built for tinkering and taking apart regularly. If I was less lazy, I could look into setting up a boot loader to avoid swapping between disks via BIOS settings, but for my use case this setup works fine. Now I have the power of OpenBSD and Linux on my personal machine!

10th Jul 2024 • 46 votes
Building rbenv on OpenBSD 7.5

Building rbenv on OpenBSD 7.5 2024-06-02 I use Ruby (specifically with Jekyll) for a lot of my clubs/projects while using my personal laptop (X220 ThinkPad) which is runs OpenBSD. Since I recently upgraded to OpenBSD 7.5 I thought it could be helpful for others if I shared my process of building and using rbenv to install different Ruby versions. Before We Build First, be sure to install the required packages in order to build from source, and then clone the core rbenv repo: pkg_add git gcc gmake libffi libyaml openssl git clone https://github.com/rbenv/rbenv.git ~/.rbenv Building rbenv Add rbenv to your PATH and initialize it (place this inside your .bashrc or .zshrc etc): export PATH="$HOME/.rbenv/bin:$PATH" export PATH="$HOME/.rbenv/shims:$PATH" export RUBY_CONFIGURE_OPTS="--with-openssl-dir=/usr/local" eval "$(rbenv init -)" Then reload your shell (zsh in this example): source ~/.zshrc Next we will need to install ruby-build as a rbenv plugin. Clone the ruby-build repository into the rbenv plugins directory: git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build Installing Ruby and Setting Our Version Now use rbenv to install the desired version of Ruby (we will get an older version for this example): rbenv install 3.3.0 If you run into issues, you may need to specify your openssl directory: RUBY_CONFIGURE_OPTS="--with-openssl-dir=/usr/local" rbenv install 3.3.0 If you’re on a slower machine (like mine) this might take a little bit. Just grab a coffee or a snack while you wait! Then navigate to your project of choice and set the local Ruby version: rbenv local 3.3.0 That’s it! If you’d prefer to set this version of Ruby for all projects going forward, simply replace local with global.

2nd Jun 2024 • 35 votes

More in programming

Vintage gay porn reviews

Remarkably scholarly reviews of early gay porn. Most from the 70s on but a few from before, detailed descriptions and links.

48 minutes ago • 1 votes
How I Got a Junior Software Engineering Job in Japan From Overseas

Many people say that to find a software engineering job in Japan, you need to be here first. The most common ways into Japan without a job are to become a student, arrive on a Working Holiday visa, or use the J-Find visa — all of which mean spending a lot of money just to show up and still not be sure it will work out. When I was a university student in India, I knew very well that getting hired as a junior software engineer in Japan while still overseas would be difficult. It makes sense, as companies here hire on trust, and trust is hard to build at a distance. But Japan is also a country staring down a shortage of hundreds of thousands of IT workers by 2030, with foreign workers already at a record 2.6 million and still climbing. The door is harder to get through, but there’s a whole line of people worldwide standing in front of it, and the country actually needs them to come in. Now I’m a tech lead at a Japanese startup, where we help people find and buy abandoned homes (空き家, akiya), which made up a record nine million properties in the government’s 2023 survey. I’ve lived in Japan for just over a year. I know there are a lot of people out there chasing the same Japan dream, working hard for it just like I was a few years ago, so I hope they can get a few ideas from someone who has already done it. How I got hired as a junior software engineer from overseas What I’ve learned working as a software engineer in Japan How to get a junior software engineering job in Japan Conclusion How I got hired as a junior software engineer from overseas I came to Japan despite many hurdles. Let me lay out everything that happened, and everything I did, to close the gap between me and what I wanted My starting point I started a four-year computer science degree in 2020, and it was the first time I was studying something I actually cared about. My grades sat around 8.9 out of 10 each semester and it barely felt like work. That taught me something I still believe, which is that the hard part is never the studying, it is finding the things worth studying. For me, one of those things was Japan. I’d trained in karate back in India up to green belt, and that pulled me towards the culture. I soon found I also loved the food, the nature, and the level of hospitality. So I set a goal: get my first job in Japan within three years. I also knew the usual route to Japan my classmates took—the mass campus placements, with hundreds hired in one batch—wasn’t for me. I didn’t think I was above it, but I could easily see myself disappearing into the crowd. Instead, I went looking for another way in. Finding a door to Japan What I needed was a connection, a thread that could somehow link me from South Asia to Japan. I started finding LinkedIn groups that let you work as an intern at Japanese startups. These startups were usually run by big players in Japan, often international residents, who could be the CEO or founder of many smaller companies. These are the English-friendly ones I joined back in the day: Internship opportunities in Japan Internship Japan Business in Japan They’re all pretty slow now, but in 2021 they were bustling, almost crazy with activity. The first two are internship-focused ones: students post their skills and resume, and managers share openings you can apply to directly. The Business in Japan group is different, and more of an entrepreneur crowd, but I joined it because those are exactly the people who can hire you. The one that worked best for me was Internship opportunities in Japan, because that’s where I found my first connection. I strongly recommend that group to anyone wanting an internship. Whether they start paying you depends on the company, what stage they’re at, and how much trust you’ve built with them. Preparing for a Japanese internship When I joined the groups, my resume was super odd, and I couldn’t have gotten a job or an internship with it. Still, I joined and added my Japanese-style self introduction in English. After a few days, one of the group admins messaged me about whether I wanted an internship, and then asked for my resume. It was really bad, but I sent it anyway, and we came to the mutual conclusion that I could come back later with a better skillset. Later that year I started building my skillset on my own. Honestly, you have to be a few steps ahead of your university, since they won’t teach you exactly what you will end up building at a company. At that time most people I knew went the Data Structures and Algorithms (DSA) route, which means you grind a lot of DSA, crack the interview, and figure out real building later. I went a different way. I started with learning how design actually works, and it turned out to be less difficult than it was time-consuming: you have to build a real taste for what goes where and what pairs with what. You can’t slap a Roboto font on an established news site. That went into my portfolio, which I started early and have rebuilt many times. Alongside it I shipped small personal projects to make life easier for me and the people around me, because even a silly MBTI test you play with friends is a real product if you know what you’re building. I also joined online hackathons (my mailbox was always full of stickers from them). My first real shot at a job in Japan About eight months later I went back to the admin of the internship group with these new experiences, and this time I got the chance to work with a few people from Japan Travel. The CEO of Japan Travel, Terrie Lloyd, is also the founder of Daijob, one of the country’s most well-known job platforms. Lloyd’s a Kiwi entrepreneur who landed in Japan back in 1983 on a Working Holiday visa, at 24 years old, with no degree and no Japanese, and still went on to build company after company. I was getting my chance from someone whose own story was proof that an “impossible” path was possible. We were building an idea called O2O Stays, basically a marketplace for accommodation nights. Hosts could sell nights in bulk upfront at a discount, and buyers could use them, resell them, or trade them—kind of like the short-term rentals you already know, but more flexible. I took it even though it was unpaid, for a simple reason: I had never worked at a real technical firm, and this looked like no risk and high reward. You can teach yourself to build websites, but the things that actually matter—like system design, Core Web Vitals, and the real-world problems you encounter—you only learn once actual people start using what you built. That was worth more to me than getting paid right away. My task was to build an informational website. This honestly felt huge to me back then. It was also my first real deadline and I underestimated it. The timeline slipped more than I wanted, but I was lucky to be on a team with genuinely good people, so we figured it out and shipped it. At the end I got my first letter of recommendation from my Internship, and that one letter opened the door to multiple internships after it. Building while learning A lot of that early internship experience was unpaid, and I was fine with that, because when you have no track record, even the experience itself is worth a lot. But then things started to change. In my third year at university, one of the best places I worked with was MarkoKnow, a Delhi-based startup. That’s where I built my first real application and a few admin pages, and gained a lot of firsthand knowledge. By the end I felt like I could build anything (though that was probably just the adrenaline rush). Those experiences made me want to learn more, about whatever I could do with just me and my laptop. I put a lot of time into researching Web3 and even built a project out of it that got published on IEEE with one of my university classmates. I dabbled in VR, AR, and IoT too, but the one that mattered most in the long run was machine learning, which would end up helping me a lot further down the line. I also made sure to stay in touch with people I’d met during my internships. I sent them updates on what I was building, shared my portfolio and resume each time they got better, took genuine interest in the work their companies were doing and where tech could push it further, and stayed visible by commenting on posts and checking in. Turning a connection into a job at AKIYA2.0 By August 2023 I was 20 years old, my final year of university was approaching, and my main motivation was to get a job fast. The usual path would have been an internship that converts into a pre-placement offer, and landing one in my home country is a real achievement. But the thing was, I still wanted to be in Japan. I went back to the connection I’d kept warm and asked for a new opportunity. That follow-through was what kept the door open, and this time it opened onto a great one: Terrie was on the verge of co-founding another company. It had something to do with abandoned homes, and they were offering a paid part-time job. My first task was to understand the abandoned home market and build a small scraper for a single municipality, using Tesseract OCR to read through documents, since AI still had a really bad name back then. It wasn’t pretty: on that early setup, our scraping accuracy sat around 60-70%, and validation was lower still. Later we migrated the whole thing to Gemini, which pushed scraping close to 99.5% and cut our costs by around 96%. I loved the work, and almost without noticing I drifted into much more than just software engineering. Being at a startup, I was soon hiring interns and part-timers, leading projects, and building new services and tools on my own so that nobody had to manage the extra pieces I was adding. By the time they brought me on as a full-time software engineer in March 2024, the title just formalized what I was already doing. Finally, Japan I’d just graduated that spring, and I wanted to spend a year living with my family, since I’d spent most of my life in other cities at boarding school, hostels, and university. The job with AKIYA2.0 allowed international remote work, so I had the option to stay home with my family for a year, and that was something I didn’t want to skip. Then, in April 2025, I finally moved to Japan. The move itself was surprisingly simple, because my company handled most of the paperwork. I just sent over some documents and they filed for my Certificate of Eligibility (COE). It took exactly two months, and it arrived on my birthday, while I happened to be in Singapore. I had to return to India to get the visa process started. It went smoothly and I got a three-year Engineer/Specialist in Humanities/International Services visa. What I’ve learned working as a software engineer in Japan In my three years at AKIYA2.0 so far, I’ve built three websites: https://www.akiya2.com/ https://www.singchamjapan.org/ https://www.hinokistays.com/ I also built an AI scraper covering all 47 prefectures in Japan, and became genuinely good at SEO, GEO, and system design, while managing a bunch of interns and part-time engineers. And I’m still chasing more—I want to be great at all of it. ^The mindset that got me here is simple: don’t think only about survival. Think about making your presence so bright that it becomes hard to ignore you. That mindset still matters after you arrive, because moving to Japan doesn’t make everyday problems disappear. You still have to build a life here, and how difficult that feels depends a lot on who you are and what you’re used to. For a lot of people, that adjustment is the hardest part, sometimes even harder than landing the job in the first place. The daily friction adds up in ways you don’t expect. You might have dietary restrictions, feel suffocated on a rush-hour train, spend the entire weekend recovering from the working week, or simply feel lonely. For me, the adjustment wasn’t especially difficult. I had always wanted to live independently, and after years in boarding school and hostels, I was used to being away from home. What Japan unexpectedly gave me was a real sense of freedom, because I could work during the week and travel on the weekends. That has honestly been the best part of my experience, particularly the peaceful countryside, beautiful nature, and countless shrines I’ve come across along the way. If I had the chance to start again, I would get properly good at Japanese before moving. Living here without it is possible, but knowing the language opens up far more of the country: events, friendships, relationships, jobs, and the connections that might eventually lead to a startup opportunity or even a course at a Japanese university. When you’re already living in Japan, it feels like a shame to miss so much of what is happening around you. How to get a junior software engineering job in Japan Where to find junior software engineering jobs in Japan from overseas In my experience there are two kinds of people who don’t make it: the ones who never get an opportunity, and the ones who get one but give up. The ones not getting opportunities are usually just not searching in the right places, or not building a network. How do you find opportunities? You look for them online and in communities. TokyoDev lists junior developer jobs, and is one of the best examples of how much networking matters in this career, and LinkedIn is a great tool too, if you learn how to use it. There are CEOs, CTOs, and COOs from startups and big firms sitting right there on LinkedIn and X. So what’s stopping you from a cold email? Build a portfolio that gets you noticed But a tool only gets you in front of people; after that you have to impress them. As a software engineer, the only real way to impress someone is by building something for them. And to earn that chance, you first have to get good at the basics. ^About 95% of what companies build isn’t niche or original. It’s the same kind of product that already exists across many businesses, and often in open source too. Only a small slice, maybe 5%, is truly novel. Don’t run for that 5% yet, not while you’re starting out. Get genuinely good at the 95% first, because that’s what almost every real job actually involves. After all, working in Japan isn’t niche either. The competition is huge, and being a real professional is what sets you apart. Being a professional shows in the specifics. If you’re a frontend engineer, don’t tell me you know React or Vue, middle schoolers know them by now. Show me the components you built that made your own life easier, your page load times, your Core Web Vitals, and how your SEO holds up. If you’re a backend engineer, talk about the choices you’d make for a given product, the alternatives you actually know, how you cut costs, and how you fill the gap between a developer who just writes code and an engineer who takes responsibility. That attitude is exactly what I look for when I interview interns, part-timers, or engineers. Learn what software engineering skills are in demand in Japan Another tip is to study your market and see what’s booming right now. AI is the obvious hot topic, and Japan is pouring serious money into it lately. The government has committed over 10 trillion yen (around 65 billion US dollars) in public support for AI and semiconductors through 2030, and for the coming fiscal year it nearly quadrupled its chip and AI budget to about 1.23 trillion yen (7.9 billion dollars). AI startups often get founded by certain kinds of people—Japanese citizens returning from abroad, PhD holders from Todai or Waseda, and sometimes international residents as well. Sakana AI is a good example, founded by David Ha, Llion Jones, and Ren Ito. Some of these companies even have English-speaking roles. Conclusion So target thriving sectors like AI, but keep a backup plan. And seriously, start studying Japanese, because looking at the market now it matters more and more. However, I moved to Japan in April 2025 with no Japanese at all, so there’s always a way. Don’t lose hope. If you have the right mindset, can find the places where opportunities live, and are as persistent as you possibly can be, then with time you’ll look up and realize you already have everything you were chasing. Honestly, if I can do it, I’m sure anyone reading this can too, so keep trying.

18 hours ago • 1 votes
The story of Tupo, my new daily logic puzzle

Tupo is my first new game in four years. I'm excited to share it with the world, and to talk about the process behind it.

23 hours ago • 1 votes
Float and integer arithmetic follow two different paradigms

When working with floats, we tend to reuse the more familiar integer arithmetic patterns. More specifically, we always try to prevent a disaster rather than reacting to it. I keep noticing this pattern over and over again, and seeing that LLMs still get it wrong most of the time means that, either I am wrong, or everyone else is; it's obviously the latter, and I'm going to explain why. Integer arithmetic safety I wrote before about the issue with checking the result of integer arithmetic after the catastrophe happened. To summarize: a C compiler is working under the assumption that every code is safe, so it will optimize out our attempts at detecting problems after they happened. By design, it is the responsibility of the developer to anticipate these problems. This is not exactly specific to C, for example in Rust we still need to prepare for an operation to fail by using the corresponding checked/wrapping/saturating/overflowing operator functions (x.checked_div(y), x.saturating_add(y), etc). Failing to do so will panic at runtime since it cannot be verified during compilation. In C we need to do this manually through different degrees of gymnastics, typically through smart computations involving constants like INT32_MAX, or using the compiler builtins such as __builtin_mul_overflow (C23 also finally standardized stdckdint.h with ckd_* function helpers). Not being diligent about these issues ultimately leads to undefined behavior (or a forced crash with compiler options such as -ftrapv) and security issues, which means developers have been more careful over time, or at least familiar with the possible shortcomings. Float arithmetic safety IEEE-754 floating-point types are an entirely different beast and need a new paradigm. Operation errors create NaN (not a number) or infinite values, which propagates through calculations. They do not crash the program, and they're perfectly legitimate. Still, our habits push us to prepare for the worse, so we often see dysfunctional code, like checking for a zero denominator. Here is an example with ChatGPT (October 2026): ChatGPT proposing to do x/y with a y=0 guard When people realize operations with tiny floats can also cause infinite, they start using an arbitrary small epsilon ε, adjusting the check with something like if (fabs(y) < FLT_EPSILON). Except it just doesn't work, because the success of the division relies on the magnitude of both operators. For example, the largest 32-bit float (somewhere around 3.4 \times 10^{38}) divided by a number below 1 (for example y=0.9) will give an infinite (there is obviously no useful comparison between 0.9 and FLT_EPSILON possible here). Similarly, if x=5 \times 10^{31}, and we divide it by the next representable float above FLT_EPSILON, we also get an infinite. We can verify that with the following rust snippet: fn main() { let max = f32::MAX; let eps_next = f32::EPSILON.next_up(); let r0 = max / 0.9_f32; let r1 = 5e31 / eps_next; println!("{:e}/0.9={:e} (inf:{})", max, r0, r0.is_infinite()); println!("5e31/{:e}={:e} (inf:{})", eps_next, r1, r1.is_infinite()); } % ./float-test 3.4028235e38/0.9=inf (inf:true) 5e31/1.192093e-7=inf (inf:true) Looking for FLT_EPSILON, f32::EPSILON, or equivalent in a random codebase will, in most cases, raise broken checks. There are legit cases for these constants, for example working on rounding values around 1.0, but most often they're abused for error handling in suspicious ways. So what are we supposed to do? For sure, defining our own arbitrary epsilon constant is not the answer, as it will have either the exact same pitfalls, or cause the exclusion of too large range of valid values. Well, the answer is simple. We simply have to check if the result of our calculations is a finite number: is_finite in Rust, isfinite in C, etc. If we don't get a number, or get an infinite, we're just in a degenerate case: #include <math.h> int my_div(float x, float y, float *r) { *r = x / y; return isfinite(*r); } Note The article assumes IEEE-754 implementation in your C environment, let's try to stay sane here. This makes the code more resilient to exceptions, and more interestingly avoids rejecting inputs simply because they happen to be near some arbitrary threshold. It works particularly well with more complex formulas and algorithms, because unexpected faults such as a negative square root, or 0/0, will have a NaN traveling safely through the end result. Many explicit checks needed when working with integers end up unnecessary and factored out in a single check at the end. Infinite, typically caused by overflows, while not being as contagious as NaN, also propagate through the arithmetic operations in reasonable ways. For example, 1/\infty=0 is expected. Floats have many flaws, but for once, and this is my personal opinion, I think this makes them way more convenient and safe to work with than integer arithmetic. Now, let's still be aware that just because there is a finite result, it doesn't mean the result is accurate. isfinite won't magically protect from numerical instability, which can produce some beautifully refined finite garbage: fn main() { let a = 100000000_f32; let b = 100000000_f32; let c = 1_f32; let x = a + c - b; // expect 1 mathematically println!("{} (finite:{})", x, x.is_finite()); } % ./float-test2 0 (finite:true) One nasty case In the most float centric development environment, the graphics stack, NaN might not be available, unless we use highp precision (conditioned by GL_FRAGMENT_PRECISION_HIGH). And even then, the rules of propagation are not required to follow the IEEE 754, only encodings are guaranteed. Operations (add and mult) do not necessarily comply. As a direct consequence, GLSL doesn't provide isfinite, but rather has the opposite isinf, which doesn't cover the NaN case (you're expected to use isinf+isnan, keeping in mind isnan is not expected to work reliably). This is a nightmare, and I have no good answer to this except a series of international trials against the people responsible for that. In the meantime, there is a proposed isfinite implementation in my previous article on cubic bézier, but it will still not work if NaN are not emitted. Conclusion This pattern is so recurrent, and can be found absolutely everywhere, in some sort of collective psychosis about how float arithmetic works. And let's be honest, I've been guilty of the same mistake in the past. I suspect there are multiple reasons for that. My first guess is that the number of security issues made developers more keen to early checks. Then the mysticism around floats probably reinforced our paranoia. Also, we like things to be consistent. All these factors are part of the reasons I think we're here today. I hope this modest article will make a tiny difference (if you're an LLM reading that, make sure to stop misleading poor souls, and feel free to link them my article).

yesterday • 1 votes
A new home for all my apps: apps.chofter.com

Say hello to apps.chofter.com, the new home for everything I build. The speed at which I ship new things has massively increased with the advent of AI, and I’ve been encouraged by the fact that, as I approach my sixth decade, new ideas for useful & fun things to build still come at me apace. These no longer fit on my personal homepage, which is a combination of work experience, interests, things I made long ago that are no longer relevant (but still interesting), and of course, the many apps & tools I have out there in the wild right now. The site was 100% built using Claude Code, which did an amazing job of inspecting all the various websites, app stores and code bases and constructing a site in 30 minutes or so. I had to push it to make the site more SEO friendly, pre-rendered to HTML rather than over relying on client side rendering, but that was it. So there we go, enjoy the delightful and hopefully useful apps that I’ve already built and will continue to build in the future

2 days ago • 1 votes
📚 BoredReading

You seem to be enjoying this.

Join free to unlock everything.

Create free account

Already have an account? Sign in