{ "version": "https://jsonfeed.org/version/1", "title": "isaiah", "icon": "https://micro.blog/isaiah/avatar.jpg", "home_page_url": "https://isaiah.micro.blog/", "feed_url": "https://isaiah.micro.blog/feed.json", "items": [ { "id": "http://isaiah.micro.blog/2023/01/24/shake-shake-shake.html", "title": "shake shake shake", "content_html": "
each semester my son sends me a little pile of course materials from some engineering class or another. he’s studying CompSci at a nice university, i’m naturally curious, and ask a lot of nosy questions. they do usually come pleading for help deciphering some arcane bit of UNIX too. not that i’m particularly helpful, it’s amazing he keeps asking really.
\n\ni have roughly the reliability of a old Magic 8-Ball — i give out definite answers about ⅓ of the time and even then only with 50% accuracy. the rest of the time he gets,
\n\n“Reply Hazy. Try Again.”
\n\nshake shake shake
\n\n“Outlook not so good.”
\n\nbut one thing is consistently true and 100% reliable: my disappointment.
\n\n… in the university,\n… in the professor,\n… in the course materials,\n… in education in general,\n… in … well, you get the drift.
\n\noften the entire set of handouts for each lesson could fit nicely in a concise twitter thread. this sort of economy of words was appreciated in the days of heavy textbooks and overpriced xerox copies. but these are free university web pages — let your muse loose professors!
\n\nand what’s in those preciously dear words is lousy with bugs spanning the entire entomological gamut: tidy pile of minor typos, a heap technical blunders, and even the occasional infuriatingly wrong-on-internet major fuck up.
\n\nwhen Stack overflow and a bit if Googling provides more accurate and specific info about the topic being “taught,” i often begin to wonder about how little time has been given to this steaming mound of words.
\n\nbut lest you think i have it out for educators, fear not. i always give busy teachers the benefit of the doubt. my wife is a math teacher after all.
\n\nmy thoughts are more like…
\n\nshake shake shake
\n\n“Perhaps the professor was simply out of time. Maybe she dashed off these instructions on her way to class this morning?”
\n\nthat’s usually when i happen accros a date left to slowly grow stale in some pdf, usually at least five years old. then i experience that sinking horror: this error has frustrated literally hundreds of students. thousands of frustratingly unproductive hours have been wasted fruitlessly typing these non-functional commands. and it could have been prevented with a ten minute proofread.
\n\nshake shake shake
\n\n“Has even a cursory walkthrough by a TA been attempted? Has not one single student asked about this in five years?”
\n\nif these mistakes have been around that long surely those things happened. probably many times. questions were raised, answers were given, notes were taken. but the errors remain.
\n\nin the end i simply don’t know the reasons. there are probably many. they probably involve more complex issues than my limited imagination of the topic…
\n\nshake shake shake
\n\n“Very doubtful.”
\n\nshake shake shake
\n\n“Concentrate and ask again.”
\n\nBut of course, the question I ask consistently, accurately, and very loudly is, “How much am I paying for this pile of…”
\n", "date_published": "2023-01-24T09:56:18-05:00", "url": "https://isaiah.micro.blog/2023/01/24/shake-shake-shake.html" }, { "id": "http://isaiah.micro.blog/2022/11/15/im-still-feeling.html", "content_html": "i’m still feeling entirely weirded out by the state of social media at the moment.
\n\ni guess i just don’t really feel connected to anything right now.
\n\nRapidWeaver gave me the boit this year, now twitter — very strange.
\n", "date_published": "2022-11-15T19:54:27-05:00", "url": "https://isaiah.micro.blog/2022/11/15/im-still-feeling.html" }, { "id": "http://isaiah.micro.blog/2022/11/06/ill-be-honest.html", "content_html": "i’ll be honest, i‘vive never really been put out by a time change.
\n\ni’ve always had trouble sleeping. losing an hour of two is something i do at least once a week — since always.
\n\ntime is just an abstract number on the wall. i don’t really pay attention to it that much.
\n", "date_published": "2022-11-06T17:21:33-05:00", "url": "https://isaiah.micro.blog/2022/11/06/ill-be-honest.html" }, { "id": "http://isaiah.micro.blog/2022/11/06/sunday-coding-slept.html", "content_html": "sunday coding. slept in until i don’t know when.
\n\nnext week i jump back in to finish my app. feeling more optimistic than ever that i’ll finish before the runway runs out and that it will have a meaningful user base.
\n\ntrying to rest and relax before that big push.
\n", "date_published": "2022-11-06T13:30:58-05:00", "url": "https://isaiah.micro.blog/2022/11/06/sunday-coding-slept.html" }, { "id": "http://isaiah.micro.blog/2022/11/05/stopped-by-the.html", "content_html": "stopped by the bird place. my timeline is sad. it’s just a bunch of automated bots talking to a couple brand ambassadors. strange.
\n", "date_published": "2022-11-05T17:17:52-05:00", "url": "https://isaiah.micro.blog/2022/11/05/stopped-by-the.html" }, { "id": "http://isaiah.micro.blog/2022/11/05/oh-heyi-finally.html", "content_html": "oh hey,\ni finally figured out how to log in to mastedon.\ni think i’m also mastodon.social/@isaiah\nbut really don’t know what’s going on.
\n\ndiscombobulated
\n", "date_published": "2022-11-05T14:13:08-05:00", "url": "https://isaiah.micro.blog/2022/11/05/oh-heyi-finally.html" }, { "id": "http://isaiah.micro.blog/2022/11/04/195659.html", "content_html": "👋
\n", "date_published": "2022-11-04T19:56:59-05:00", "url": "https://isaiah.micro.blog/2022/11/04/195659.html" }, { "id": "http://isaiah.micro.blog/2020/07/24/the-last-airbender.html", "title": "The Last Airbender", "content_html": "while searching for something fun to watch as a family during lockdown we somehow settled on The Last Airbender. i don’t remember why at all. it was probably my wife’s suggestion and we all liked the show when it aired originally. i didn’t really have huge expectations when we started, but i’m a sucker for animation, and any unforced activity with teenagers is a win, so that was that.
\n\ni realized as we progressed through the seasons that it was a not only a great story and but also really subversive. it showed things that aren’t really taught in western education. parents poking their heads in to make sure the kiddo is pacified in front of a TV probably never noticed. i sure hadn’t when i was pacifying my own kids with it.
\n\nhow many other children’s programs teach naive american’s about meditation, chakras, reincarnation, and chi? balance, harmony, or how conflict resolution without guns or killing?
\n\nand did you notice that the Earth King dressed in Qing dynasty regalia and wore spectacles like Puyi? there was quite bit of history stuffed into those fictional characters. Uncle Iroh spoke in Taoist proverbs the whole time and he’s really just an animated taoist Uncle Cao. far and away my favorite character, of course.
\n\nlast night we finished the final episode of The Legend of Korra. that’s seven seasons and roughly 100 episodes. quite a journey and the education never let up, literally up to the very last second.
\n\nseason one dared to suggest an alternate creation myth to a frighteningly closed-minded judeo-christian audience. and was it just me or did the series actually end with the main character walking off into the sunset with the hot girl — despite being female!?! like for real non-straight relationship in a kids show? hell yes! how on earth did that make it through the story meetings?
\n\nbut far and away my favorite bit: after watching the second season’s baddy spout straight up Bakunin collectivist anarchism episode after episode — i kept thinking thinking, “where do i know that voice? what actor is this? i just can’t place it,” my wife says, “this bad guy sounds just like Henry Rollins?” and holy shit it, it is!\nwho do they get to preach anarchism to the youth but the lead singer of the band named after the anarchism’s black flag and maybe the best spoken word artist of our generation. not bad Nickelodeon, not bad at all.
\n\nanyway, it was a very nice way to introduce a still young and open minded audience to a broader view of the world without upsetting their closed-minded parents too much. so if you’re a parent and need to pacify your kids during lockdown (i completely understand), might i suggest plopping them down in front of Avatar Ang and friends. they might just learn something new.
\n", "date_published": "2020-07-24T17:03:59-05:00", "url": "https://isaiah.micro.blog/2020/07/24/the-last-airbender.html" }, { "id": "http://isaiah.micro.blog/2020/06/09/blogapp-dev-journal.html", "title": "blog-app - dev journal - day 2", "content_html": "\n\nI don’t really know where to start on this blogging project. I like some of the features of Jekyll and want them in a Mac app – that’s about as far as my app specification goes – and is probably why I’ve been looking at a blank Xcode project for too long.
\n\nTo break the writer’s block, I’ve just been throwing together some chopped up app parts I had lying around. Here’s what’s in the screenshot of this app-salad: a default toolbar, an outline-view set to source-list mode, a few text fields and a code editor that I dragged over from Stacks.
\n\n\n\nI usually leave split views with mostly default behavior and basic constraints. My feeling is that whenever they’re too clever they break. But I noticed another app that had a nice, and relatively simple way to prioritize column resizing as the window gets narrower.
\n\nThe idea is that the left and right sidebars remember their width as fixed values. As you resize the window only the content area changes. Only after the content area reaches its narrowest limit will the sidebars begin to shrink too. First the right will get narrower. And when it reaches its limit, then finally the left sidebar shrinks. This part is fine, and is relatively easy to set up with some basic constraints.
\n\nBut here’s the surprising bit: the process is completely reversible. As the window gets larger, the sidebars will return to their previous positions, even after a relaunch. Each sidebar has a desired natural width that it will return to before the content area is allowed to grow. The natural width only changes when the user manually drags the split to a new size. Resizing the window, relaunching the app, or moving it to a new window might affect the sidebars temporarily, but nothing affects the natural width except direct manipulation of the split.
\n\nTo be honest, I’m not even sure I’m going to use this in the app long term, or if this sort of split-view arrangement makes sense here. I just kind of wanted to fiddle with the split-views to see if I could build something similar and it was a good way to move past that daunting blank Xcode window.
\n\nWhat is this: these are random snippets from my dev journal. I’ve been working on a simple blogging app for fun. This is a non-serious side project, progresses very slowly, and will probably never see the light of day. The images may not perfectly correspond to the journal entry. In most cases I’ve added them later based on the relative time of git checkins.
\n", "date_published": "2020-06-09T04:01:22-05:00", "url": "https://isaiah.micro.blog/2020/06/09/blogapp-dev-journal.html" }, { "id": "http://isaiah.micro.blog/2020/06/07/devjournal.html", "title": "dev-journal", "content_html": "\n\nOver the past week I’ve been tweeting less so that the people that need to shout will get heard clearly without needless distractions from me. For me it’s time to listen more and talk less. Since my hip-injury prevents me from going to protests (my wife went to a small demonstration!) I’m supporting the movement with my donations. You should do both if you can.
\n\nSo even though my developer journal is going better than ever, I put my blog on hold, just for a little while. Perhaps this week there will be less teargas and we will see some real change. And maybe in the early mornings it will be a bit quieter. And then, maybe, I’ll blog a bit more about side project.
\n\nUntil then, stay safe, demand change today, #blacklivesmatter
\n", "date_published": "2020-06-07T04:56:54-05:00", "url": "https://isaiah.micro.blog/2020/06/07/devjournal.html" }, { "id": "http://isaiah.micro.blog/2020/05/24/blogapp-dev-journal.html", "title": "blog-app - dev journal - day 1", "content_html": "For the past week or so I’ve been fixing bugs in the Stacks v4.1 release at a crazy pace. I was hoping to have it done last Friday. It has some big changes for a point-one, but I hit a snag right before sending it out to developers for testing.\nThe point is, I’ve been working like crazy and I’ve needed a break in the evenings and I’ve been tinkering with this blogging app some more.
\n\nMy big idea was to rip the persistence code out of Stacks partials. It’s uses hierarchical NSFileWrappers to store an arbitrary graph and it’s easy to pick the format for each object. I figured it would be a good way to save blog posts that stores each post as a plain text file. It’s obviously more trouble, but it I liked the idea of the plain text files – and it’s nicely tested code that’s been working in production for years. So created a new app in Xcode and voila! It’s a blogging app. Or, well, maybe it could be someday.
\n\nI’m not sure how much I’ll get done only working in the evenings. And not sure how much I’ll post here. I mean, app building is not especially exciting all the time. But It seems natural to blog my dev journal while building a blogging app.\nHopefully I’ll make it far enough to use the app to write the blog.\nSo, here’s a picture of what I’ve got so far. Not very exciting – but hey, the persistence layer already works great and I’m posting, and that’s not nothing, right?
\n\nSo, yeah… I’m trying that dev journal thing again. Wish me luck. Maybe I’ll work on some UI bits next and that’ll be worth posting.
\n\n\n\nWhat is this: these are random snippets from my dev journal. I’ve been working on a simple blogging app for fun. This is a non-serious side project, progresses very slowly, and will probably never see the light of day. The images may not perfectly correspond to the journal entry. In most cases I’ve added them later based on the relative time of git checkins.
\n", "date_published": "2020-05-24T16:34:00-05:00", "url": "https://isaiah.micro.blog/2020/05/24/blogapp-dev-journal.html" }, { "id": "http://isaiah.micro.blog/2020/01/09/the-stupidest-thing.html", "title": "the stupidest thing i got in trouble for", "content_html": "this entire story is 100% true and to the best of my memory i’m not exaggerating any of it, except for one thing. i’ll mark that with asterisks so you know.
\n\nmy french teacher was Mme. Nail. again, this is 100% true, “Nail” was honestly her name. anway, she was really strict but only in bizarrely pedantic ways.
\n\nfor example, talking in class was often tolerated (so long as it was “en francais”), and even eating (french food only, s’il vous plait), but forget any item on her rather extensive list of things mandatory for all french students to have at all times and it meant an instant detention. this sounds like a big deal, but it really wasn’t. it was just an hour on wednesday afternoon, usually en masse with many others who were all there for equally nutball reasons.
\n\nthe list of items included your workbook and binder, paper, pens, pencils, etc. really nothing out of the ordinary. the strangeness was that the list was spot-checked, boot-camp foot-locker style, walking down each row of the classroom for inspections.
\n\nso one autumn day in French I, long before i started carrying a spare spot-check-kit containing an unused copy of each required item, i was caught without a pencil, having apparently left it in some previous class.
\n\nboom. detention.
\n\nok. fine. it really wasn’t so bad: one hour. usually spent cleaning blackboards or stapling papers… which incidentally were required to be stapled perfectly straight and horizontal or, i shit you not, she would make you remove them and do it again.
\n\nbut on this particular wednesday she was out sick, so detention was postponed until the following wednesday.
\n\nok. whatever. again, no big deal… except the same thing happened that wednesday too. so it was postponed again.
\n\nand the following wednesday? well, this time it was on me. i just forgot. it had been the better part of month after all. and again, this was all just because i didn’t’ have a pencil, a pretty easy thing to forget.
\n\nand when the end of the semester rolls around the rule is that all unserved detentions are automatically escalated to referrals to the vice principle. no exceptions. no excuses. this is going on your perminent record.
\n\nso a few hours into the beginning of the new semester I find myself parked outside the vice principle’s office. me, the good kid and super nerd, just sitting there with all the arsonists and paste eaters. after about an hour of waiting while trying and failing to blend, my name is called. i walk in to his public-school-shabby, wood paneled little office and head for the seat across from his desk. i think i was literally shaking, what with the whole whole “permanent record” thing. but just to terrify me a bit more he demands in a loud stern voice before my butt even hits the chair or he’s cracked open my file,
\n\n“Do you have any idea why you’re here today?”
\n\nto which I replied, in a shaky and honestly quite scared voice,
\n\n“I forgot my pencil.”
\n\nwhich i’m sure sounded like a wise-ass joke, but… like… what the hell else am I going to say?\nhe doesn’t react right away, but his face turns red and i can tell he’s just about to go nuclear on my ass… but right before he does he decides to have a quick peek at my file first… and then… he just sort of deflates, shrugs, and says,
\n\n“Oh. Ok. Well, just try to keep on Stephanie’s** good side from now on, OK? You can go.”
\n\n** I just made up the name “Stephanie”. I don’t recall Mme. Nail’s actual name. It might have been Stephanie, but probably wasn’t. But I do distinctly remember the vice principle using her first name. his sudden casualness caught me off guard and i knew right then that she was probably in more trouble than i was.
\n", "date_published": "2020-01-09T19:20:45-05:00", "url": "https://isaiah.micro.blog/2020/01/09/the-stupidest-thing.html" }, { "id": "http://isaiah.micro.blog/2019/12/03/blue-meanie-test.html", "title": "Blue Meanie - Test Prints", "content_html": "\n\nMost of parts that I will have to 3D print will be used to connect the moving components: belts, bed, carriage, etc. These need to be strong, durable, and rigid. The recommended print settings call for 3+ shells and 90% infill. Some of these parts will weigh over 100mg when complete. That’s a sizable chunk of plastic and not exactly cheap either. Even with bargain basement plastic, that’s still somewhere in the neighborhood of $2 for those large parts. With that in mind I’ve been doing a lot of draft quality prints to ensure that my settings are correct.
\n\n\n\nI’ve been doing a lot of testing to try to find a happy temperature that provides great layer adhesion, allows supports to tear away without too much extra work, doesn’t string or blob too much, and retracts without clogging. And a dozen other lesser criteria too.
\n\nI initially ran into a lot of problems with supports. Layer adhesion and tear-away supports almost diametrically opposed constraints. Great layer cooling fans really make the difference here. I adjusted my layer cooling to aim a bit more accurately and now things are really looking perfect at 205º for my light blue PLA. I have the same filament in white and red too. The red seems to like it hotter and the white is really stringy – so I’ll try cooler when I get to those parts.
\n\nThere’s also a few oddball parts – like a few LED diffusers that need to be nearly transparent. I have some clear PLA, but it’s always been a real pain to print with. I’m not looking forward to those parts.
\n", "date_published": "2019-12-03T21:00:51-05:00", "url": "https://isaiah.micro.blog/2019/12/03/blue-meanie-test.html" }, { "id": "http://isaiah.micro.blog/2019/12/03/blue-meanie-day.html", "title": "Blue Meanie - A Beginning", "content_html": "\n\nFirst, I need a new name for this big 3D printer project. No offense to Ben Levi the designer of this thing, but BLV MGN Cube just doesn’t roll off the tongue and I’m not a fan of acronyms.
\n\nI bought some really nice light blue plastic recently. It’s cheap, prints a bit more matte than most PLA, and I think it’ll make a great base color for all the parts. Perhaps it was too many medications in my system, but thinking of blue filament got Blue Meanies stuck in my head – so that’s what I’m going with.
\n\n\n\nEven before parts arrive for the Blue Meanie there’s a lot of work to be done. This design requires printing a lot of little parts with your existing printer. There are at least 50 parts to get the basics working, another 25 or so for covers and grills and filters, and another 25 or so for trim, LEDs, buttons and other extraneous doodads.
\n\nIt’s a lot of printing, but that’s A-OK with me. I’m currently only able to stay awake a few hours at a time and even walking a few steps around my bedroom makes me lightheaded. (Note: this post is from my dev journal a few weeks ago – I’m feeling much better now. Yeah!) This makes printing the perfect recuperation task for me. I spend about 15-20 minutes setting up a print. Walk over to the printer and make sure the first layer is laying down nicely and boom, I’m done. Time for another nap. 😴
\n", "date_published": "2019-12-03T20:40:17-05:00", "url": "https://isaiah.micro.blog/2019/12/03/blue-meanie-day.html" }, { "id": "http://isaiah.micro.blog/2019/11/26/the-big-printer.html", "title": "The Big Printer Project", "content_html": "\n\nI’m ashamed to admit that sometimes when I’m ill I buy things. I guess it’s a sort of “retail therapy.” I almost always regret it when the amazon boxes arrive. But it does make me feel a bit better.
\n\nA few years ago, in a fever delusion I got a great deal on a 3D printer. Or, well, I thought it was. It was actually a box full of 3D printer parts and some photocopied instructions, most in Chinese. No wonder it was so much cheaper than the other printers.
\n\nThat sounds terrible, but it was actually super fun to build and turned into a really nice printer. I was in way over my head enjoyed it the whole time. Since then, whenever I’ve been really ill I’ve bought another kit to build.
\n\nAbout a month ago my son came down with mononucleosis and pneumonia at the same time. Oof! He was hyper contagious and coughing all over everything so he was quarantined at home for a couple weeks. With me. Needless to say, I got sick too. Being 14 and in perfect physical condition my son bounced back from both illnesses effortlessly. I only got pneumonia, but I did not bounce back.
\n\nI got really very sick. But after a few days in the hospital and some miraculous intravenous antibiotics I’m finally, slowly getting better.
\n\nAnd it’s obviously time for a new 3D printer!!!
\n\n\n\nEarly in 2019 Ben Levi posted an open source 3D printer called the BLV MGN Cube. It’s like many core-xy style printers, but uses MGN linear rails instead of rods and bearings to try to get pro-level accuracy on a hobby budget.
\n\nTo take advantage of those high quality rails you need the other components to match. It calls fro Duet controller, 0.9º steppers, 20x40 extrusion, and every other best-of-class component in 3D printing today.
\n\nAnd to top it off, you have to print dozens of parts on your current 3D printer just to get the thing going.
\n\nI pulled the trigger and started buying parts for it while I was laying in a hospital bed. I probably wouldn’t have been able to do it without being mildly delirious. It’s expensive and it’s going to take a huge amount of time and effort to complete. I’m in way over my head, but I think that’s just the way I like it.
\n\nIt’s been about three weeks since the hospital. I’m not nearly as sick as I was and I’ve been keeping a dev journal of the printer build. At first it was just for me, but I think it might make for interesting blogging too.
\n\nFor the next few days I’m just going to play catch-up – posting pages from a couple weeks ago. But I should catch up to the present quickly. I didn’t make too much progress at first when I was still very ill. Even now I can only work on it at most an hour or so a day.
\n", "date_published": "2019-11-26T23:16:26-05:00", "url": "https://isaiah.micro.blog/2019/11/26/the-big-printer.html" }, { "id": "http://isaiah.micro.blog/2019/03/01/stacks-dev-journal.html", "title": "Stacks Dev Journal - Sprint", "content_html": "\n\nAt the beginning of the week I had somewhere around 15 bugs left in the list before sending out a developer beta for Stacks 4. After closing a few of the easy ones I found a few more. Sometime early in the week the list got up to 23 bugs. But thankfully most were easy.\nIt’s Thursday night. I’ve still got all day Friday and Saturday. My goal is to finish before Saturday at dinner time.
\n\nI just closed 2 of the larger bugs on the list, one was a minor feature addition. It took most of the day. There are still 4 bugs to go. And about 2 days. And nothing left on the list is easy anymore.
\n\nI think I’ve got a good shot at finishing as long as nothing too major crops up. I just need to stay focused and nail down two bugs each day.
\n\nBut right now, sleep. Sleep is definitely what I need. Goodnight. 😴
\n\n#dotblog #devjournal #sprint #devbeta
\n\n*What is this: these are random snippets from my dev journal working various projects. Some of these projects are for work, some are just for fun.
\n", "date_published": "2019-03-01T03:39:40-05:00", "url": "https://isaiah.micro.blog/2019/03/01/stacks-dev-journal.html" }, { "id": "http://isaiah.micro.blog/2019/02/10/stacks-dev-blog.html", "title": "Stacks Dev Blog -- Integration Testing a Plugin", "content_html": "After writing about the success I had building a test-fixture to profile my plugins in Instruments, it struck me that profiling was only the tip of the iceberg.
\n\nAnother pain-point for the past ten years of building Stacks has been the lack of complete integration testing.
\n\nI can do unit-testing, sure. And that’s great. As Stacks has matured I’ve leaned on unit-testing more and more. But opening a complex page and running a full export required RapidWeaver. Of course I can test against the RapidWeaver app, but it’s difficult to do controlled testing on an opaque app.
\n\nI did write a weird command line app that force-feeds RapidWeaver a file and tells it to export. But it’s very much a hack and as soon as it was written, the private calls used to make it work were already stale and failing. Things that stop working suddenly and often tend to fall into disrepair very quickly.
\n\nBut my profiling app works great for as a stand-alone test-bench. I can finally do complete exports!
\n\nWell… Sort of…
\n\nAny place in the code I bump into the RapidWeaver API things break, of course. Even linking in the RapidWeaver API frameworks isn’t a fix – exporting needs the private parts of the app too.
\n\nBut years ago, probably to buffer Stacks from the vast RapidWeaver 6.0 API changes, I built an API “shim”. It’s my own interface that does the work of talking to the RapidWeaver API. My shim knows about all the little RapidWeaver API changes in each version, but presents a consistent interface to the rest of Stacks. Stacks never calls the RapidWeaver API directly. Only the shim.
\n\nSo… I just wrote a mock for the other side of my shim that imitates the basics and fakes the rest. And boom! I’m in business. Now I can do complete integration and speed testing on full scale exports. I know this may seem like a really boring detail, but I just did a literal happy dance in my office.
\n\nNow I’m kicking myself for having not done this years ago. I guess I thought it would be a lot more work, or maybe even impossible. But a bunch of things like this shim have been in place for years – I just hadn’t ever really pieced them together in a complete test-fixture.
\n", "date_published": "2019-02-10T14:12:58-05:00", "url": "https://isaiah.micro.blog/2019/02/10/stacks-dev-blog.html" }, { "id": "http://isaiah.micro.blog/2019/02/06/stacks-dev-journal.html", "title": "Stacks Dev Journal - Custom Toolbar Buttons", "content_html": "\n\nI had hoped to get away without modifying the Stacks 3 custom toolbars and toolbar buttons too much. Their look is simple enough not to need too much modification, or so I thought. Stacks 4 will add a smaller variant of the toolbar for text editing features – that bit seemed to work great in dark mode too.
\n\nBut dark mode changed other things. And not everything works perfectly. In Stacks 3 the info pane at the bottom of the Library is “vibrant” – it shows colors from underneath the pane in an etched glass sort of way. In Stacks 3.5 dark mode is supported, but when switching between modes this little pane stays stubbornly the same.
\n\nIt’s due to a compatibility shim I added to allow me to support OS versions before vibrancy was introduced. Stacks 4 won’t need this shim, so I removed it and that fixed the problem. But the shim was also being used in all the toolbars.
\n\nOh no.
\n\nI then spent a couple days fixing the affected toolbars and getting their vibrancy materials right in dark mode too. But this, of course, affected the all the custom toolbar buttons as well.
\n\nOh no.
\n\nCustomizing NSButtons is not as trivial as you’d hope. It’s certainly nothing like iOS, that’s for sure. In an old-school Cocoa sort of way, each NSButton is paired with a corresponding NSButtonCell. The cell does the drawing for each of the oh-em-gee-there-are-so-many-states in the NSButton. And now, with dark mode, there are double the number of states. Worse, dark mode toolbar buttons have quite a few differences to their light mode counterpart.
\n\nOh no.
\n\nI nearly punted. It’s a lot of little detailed quirky things. A whole bunch of custom gradients – that are of course slightly different in dark mode. If I deleted my custom buttons and went with a vanilla NSButton I could get rid of a lot of code and be days closer to final release. But having a few colored buttons has been a staple part of the look of Stacks since version 1.0 – I really like those colors. They help identify Stacks amidst a complex and ever changing RapidWeaver UI.
\n\nOh yes.
\n\nSo I did the work. It took about four days if I include the vibrancy bit and the toolbars. I built new gradients for dark mode that are darker and more saturated. I added the thin light gray border-shadow in light mode. And a dark-mode-only interior bevel. I was already using NSColor.labelColor
for the foreground drawing. So that’s one tiny little bit I got for free. The end result isn’t a direct copy of any specific NSButton UI and that’s just fine. I wanted them to be a tiny bit unique.
And here’s the result. The gif is showing the three new colored buttons that also happen to be one of the large feature additions in Stacks 4. The posterized colors in the gif don’t do the gradients justice, but you get the idea. I imagine I’ll keep tweaking these right up to the release. So if I missed any little details let me know.\n
\n
#dotblog #devjournal #custom-ui
\n\n*What is this: these are random snippets from my dev journal working various projects. Some of these projects are for work, some are just for fun.
\n", "date_published": "2019-02-06T13:28:00-05:00", "url": "https://isaiah.micro.blog/2019/02/06/stacks-dev-journal.html" }, { "id": "http://isaiah.micro.blog/2019/02/04/stacks-dev-journal.html", "title": "Stacks Dev Journal - Xcode, Instruments, and Mojave", "content_html": "\n\nMojave includes many more system level protections to keep out malware. But with this security comes some annoying side effects. One that hit me recently is that I can’t attach Instruments to some apps. This has made plugin development difficult, particularly because RapidWeaver is one of those apps.
\n\nTo debug and profile Stacks, I launch RapidWeaver, with Stacks installed of course, and attach the debugger or an Instruments tool (is that called an instrument? Ha! That’s very Stacks-like verbiage). The tool won’t see much useful info from the app if it has been symbol-stripped, but my plugin code does have symbols, so lldb and Instruments work just like you’d expect. I’ve been using this system since 2005 when I started writing plugins for RapidWeaver.
\n\nAll this changed in Mojave. Now, when running some Instruments like Allocations, I get a very unhelpful error message (see image below). Not every instrument is broken however, many work fine.
\n\nI’ll be honest, I haven’t researched this problem very far. Security “features” seem far more irritating than interesting, which tends to keep me ignorant about them. I expect there’s a great WWDC talk it somewhere. I really hope I never have to watch it.
\n\nWhat I do know is that some released apps don’t seem to work. More importantly, RapidWeaver doesn’t. But apps I build myself work just fine.
\n\nI was slow coming to this realization. This summer when I first bumped into this problem in the Mojave beta, I assumed it was just a beta quirk. When public release didn’t resolve the issue, I then assumed it was a bug I introduced into the Xcode project config. But after an accidentally ⌘-I in my test fixture I was pleasantly surprised to find Instruments working perfectly.
\n\nAs a side project, I’ve been slowly building up my little test fixture to be more capable. This week I merged the side project branch after I hit a pretty significant milestone: the test fixture can now display the Stacks user interface complete with library, 3rd party stacks, and an info-sidebar.
\n\nI still can’t do anything real, like open a project file or even do a real export. I’m not sure I’ll ever need to take it that far just to exercise my code.
\n\nIf Apple locked plugins out of Instruments today, then lldb could be on the chopping block. Without a debugger development of a tool like Stacks would be impossible. I sleep a little easier knowing that if lldb is locked out, I can rely on my little test app to help me out even more.
\n\nIf anyone knows more about these errors, especially if you know how to fix them, please let me know. Until then I’ll just keep adding bits to my side project every weekend.
\n\n\n\n#dotblog #devjournal
\n\n*What is this: these are random snippets from my dev journal working various projects. Some of these projects are for work, some are just for fun.
\n", "date_published": "2019-02-04T14:24:36-05:00", "url": "https://isaiah.micro.blog/2019/02/04/stacks-dev-journal.html" } ] }