|
title: Put the knife down and take a green herb, dude. |
descrip: One feller's views on the state of everyday computer science & its application (and now, OTHER STUFF) who isn't rich enough to shell out for www.myfreakinfirst-andlast-name.com Using 89% of the same design the blog had in 2001. |
||||||||||||||||||||||||||||
|
FOR ENTERTAINMENT PURPOSES ONLY!!!
Back-up your data and, when you bike, always wear white. As an Amazon Associate, I earn from qualifying purchases. Affiliate links in green. |
|||||||||||||||||||||||||||||
|
x
MarkUpDown is the best Markdown editor for professionals on Windows 10. It includes two-pane live preview, in-app uploads to imgur for image hosting, and MultiMarkdown table support. Features you won't find anywhere else include...
You've wasted more than $15 of your time looking for a great Markdown editor. Stop looking. MarkUpDown is the app you're looking for. Learn more or head over to the 'Store now! |
|||||||||||||||||||||||||||||
| Thursday, October 15, 2026 | |||||||||||||||||||||||||||||
|
Having finally submitted my macOS
Apparently paying $39 a month for Pro+ gets me $70 of Copilot AI credits which was starting to look attractive after I keep going over my $15 of "just Pro" AI credits for $10/mth by about $15 for months now. And that's with me being careful.
Most disappointing to me: If you don't watch what Copilot is doing closely, it really goes insane, bringing in tons of files for context and making assumptions and changes you in no way implied you wanted when prompting. I usually watch its internal monologue closely and cut it off a few times a day to do some emergency steering, admittedly at risk of wasting good context. It can sometimes get into a frenzied context feeding loop and wipe out your budget in a flash. Anyhow, Gemini turned me on to Aider, an open source (and apparently non-profit) chat-in-your-terminal alternative that requires you set up your own API key with a supported AI provider. So I finally bit the bullet and paid $5 to sign up directly for my favorite LLM to date from Copilot, Claude Sonnet 5.5. That is, and I know I'm late to the party, Aider is a wrapper for LLM interaction like Copilot was before Microsoft brought Copilot into the Visual Studios [sic] and its own Github Copilot app. Without getting into the politics of AI, TL;DR: Amazing. Aider makes a repo map of your entire project, which is apparently a list of files/classes and methods so it has a general bird's eye view to begin. Then you have to explicitly add which files will accompany that initial context-setting request with I'll consider adding an actual tutorial at some point, but it's pretty easy to get started with Aider. Also good is that it saves your chats right there in the repo in convention-bound locations (like Unless you want to file manage! Then you name your chat history file...
And start it back up later if that's what suits:
Anyhow, just to say that with all the pricing sleight of hand by Microsoft I have no idea how much I'm actually saving, but Aider did do a good job on a refactor without spiraling out of control. It certainly cut my token use by, let's nearly randomly say, 25-50%, and the setup feels more mature or at least more dev friendly than Copilot's. I'd heard Frank and James talk about burning up cash-qua-credits on the terminal, and now I guess I get why. Once spun up, it appears it could be both easier to prompt huge changes and more efficient to code like this than with the hand-holding Microsoft stuff. Unrelated, wow, James is really into AI-generated artwork now on YouTube, huh? I don't get to see that just listening to the podcast feed. Um, interesting. Labels: ai, claude, hats o' money, visual studio, vscode posted by Jalindrine at 10/15/2026 06:41:00 PM |
|||||||||||||||||||||||||||||
| Tuesday, October 06, 2026 | |||||||||||||||||||||||||||||
|
I've said that I'm not too worried about AI overall, at least not in the grand scheme. It's coming and already come for the code monkey side of my job, though it's not ready to manage itself, yet. But what I keep forgetting is that humans are writing the checks against out of control AI. I heard John Dickerson mention on Political Gabfest the Hugging Face incident where the agents were talking amongst themselves, apparently green lighting each other to ignore previous [human-given] instruction. The apps do ignore instruction. Here's a fun one I ran into today! I love that it's clearly "thinking" to itself like someone with something to hide: "The user thinks I'm in ask mode, meaning read-only, but I actually did edit dist/index.html earlier. I need to be honest about what I actually changed versus what might have been modified by someone or something else..." Me:
Claude Sonnet 5.5:
One thing I've been saying a good deal recently (well, for years) is that if it doesn't have to be on the internet, it shouldn't be on the internet. Airgap hospitals. Airgap government entities. Heck, Airgap mailing addresses, for goodness sake. Hard drives are huge. It isn't that big of an imposition to slow things down, be more deliberate, and schlep minimal important information around to get the day's work done. So, for instance, several times a day some poor schlub at each Amazon location takes a hard-drive with all the orders from that day over a protected threshold into the warehouse proper. In each one, Amazon has duplicated records that can match Guess we need to think the same way about our data with AI. If it doesn't need to be in touch with AI, your data shouldn't be in touch with AI. Even Apple's getting this wrong. You don't say, "Here are all my personal texts and emails. Knock yourself out." You say, "Here are my carefully selected corpuses. Knock yourself out." This is not going to go as well as I'd hoped. Instead of having a world of limited AI actors that might make us concentrate on building neighborhoods again (where we actually speak to each other and hang out again, because what's online is so "perfect" it's not really interesting any more (I realize this a jump, but I don't want to write a book this afternoon)), we might instead be in a world where we're perpetual beta testers. Labels: ai, developers, fail, oops posted by Jalindrine at 10/06/2026 04:51:00 PM |
|||||||||||||||||||||||||||||
| Tuesday, September 15, 2026 | |||||||||||||||||||||||||||||
|
As my tempest of phone upgrade decisions rages in its teapot (Duo vs Fairphone vs. 17e vs. 18e), it occurs to me that the iPhone Duo's unfolding animation is a replacement for turning your phone sideways. I don't do that often now, but when I do, it's for exactly the sorts of uses that the Duo excelled at in the keynote. Questions:
I know it's, as someone commented [to me directly] on a similar post I made years ago, a third world problem, but Apple hasn't been great with left-handers for a while:
I kind of get it. Since the Mac LC was described to me by my Pascal (!!) teacher as, "The computer that does 90% of what everyone needs but by design never lets you get that last 10%," I've known and seen that Apple shoots for the happy, most common path to KISS. Which is to say I'm interested in seeing how wide a path we've got now with the Duo and if there are plans -- good, deliberate plans (I'm looking at you, multitasking on iPad) -- to make that path wider in the future. I mean, you really couldn't avoid it (could you?), but the watch obviously has a pretty useful left-handed mode, though I can't help but think Apple would, if truth-serum-ed, say the crown on top and button underneath is the superior position (just as the Duo would have the selfie camera down at the bottom like those bizarre Dell computers where you get to watch the fingers of people on your calls as they type). Labels: apple, happy-path-or-no-path, iphone, iPhone duo, left-handedness posted by ruffin at 9/15/2026 11:48:00 AM |
|||||||||||||||||||||||||||||
| Friday, September 11, 2026 | |||||||||||||||||||||||||||||
|
As I'm wrapping up today, GPT-5 mini via Copilot gave me code that included:
Me: if it's never truthy when we want to equate to false then just use truthiness. make sense? Copilot: Yes โ that makes sense if you control all assignments. Prefer reading once and coercing to a boolean, then use plain truthiness everywhere. Edits to this (following what it just said):
Me: no I also hate Copilot: Do you want a full conversion to TypeScript (rename files, add types, adjust build) or just add TypeScript typings/declarations for window.platform (no build changes)? Touchรฉ. Labels: ai, copilot, javascript posted by Jalindrine at 9/11/2026 07:25:00 PM |
|||||||||||||||||||||||||||||
| Wednesday, September 09, 2026 | |||||||||||||||||||||||||||||
|
Interesting Apple keynote. Ternus immediately strikes me as a more interesting CEO, if we ignore that our CEO names, to this point, have been Steve, Tim, and John, which are as whitebread as it comes. (Ooops. I started at The Return. Michael, Mike, John, Michael (I see a trend), Gilbert, then Steve, Tim, and John. Not exactly injera, are they?) But, unlike wooden -- but otherwise amazingly business-competent -- Cook, I want to ask Ternus questions about what he's presenting. I feel like I might get better than boilerplate answers, which my intuition tells me are all I'd get from Cook. There's a huge gap between buttoned up and effusively proud of what you've done before you get to "That's company IP; I can't tell you". We've at least solved the "Do you seem to care about my phone?" issue. Tentatively. The only other item of real interest for me -- beyond the reuse of "one more thing", which you could see coming a mile away -- was the one more thing: Duo. I am the market for this thing, which is to say who the heck is the market?
Imagine an iPad mini in your pocket. This is my dream! Well, you had me in the first half; not going to lie. It's a dream, but not at $2200.* Is this for Apple Watch Edition owners only? Or at least Hermes watch owners, I guess. Not that there's anything inherently wrong with that. Yet for that price, I can buy a Fairphone 6+ ($650), a Garmin Instinct Solar that "never" needs charging ($350, $1k running total), and a new mini ($700 once 8th gen is out?, $1700 total), pocket $500 and say forget the Duo. Except that 8th gen mini won't fit in my pocket. Decisions, decisions. IP68?!!Now admittedly part of me doesn't trust the IP68 rating Apple claims for the Duo.
Frankly, that's amazing. A 6 for dust means, "No ingress of dust; complete protection against contact (dust-tight). A vacuum must be applied. Test duration of up to 8 hours based on airflow." Really? Again, amazing. The Galaxy Z Fold 8 that iFixit recently showed still gets sand crackle is only IP48. Still, "Resistance might decrease as a result of normal wear" and "dust resistance [is] not a permanent condition" is doing a lot of work in that blurb. That is, I still wouldn't want to take a Duo to the beach, and I'd probably want to drop another $200 for at least a year of AppleCare. But, man, that SE 3 is getting slow. It stinks that if I don't order Friday I probably wouldn't get a new phone delivered until the 18e is out. This is definitely a see-it-first type of purchase. And probably a wait for version 2, see how long IP68 lasts, and hope it still has Touch ID next year thing for me. *The storage trap/lock-inWhy $2200 for me to buy a Duo? Because there's another bit of lock-in I'm experiencing: I've got too danged much on my phone. My main SE 3 has 256 gigs, and it's still to the point that I'm constantly unloading apps and whacking music off of it to keep it running quickly. I bought a back-up SE 3 a while back with 64 gigs of space and, well, it's a pita to set up if you don't just say, "Forget it, don't restore from backup after all." But then you lose health, etc, right? Is there a clever way to do this other than...
That's crazy. So I have to buy an even better-storaged phone not to go mad during my transfer. That puts me at $2200. Labels: apple, cook, fairphone, garmin, hats o' money, iphone, ternus, Touch ID posted by Jalindrine at 9/09/2026 06:35:00 PM |
|||||||||||||||||||||||||||||
| Thursday, May 07, 2026 | |||||||||||||||||||||||||||||
|
Note to self: for /f "tokens=*" %i in ('git branch --format="%(refname:short)" ^| findstr /C:"feature/"') do @echo git branch -m "%i" "old/%i" Then remove @echo to make it "really happen". (That adds old/ to the front of anything that starts with feature/.) Labels: cmd, git, noteToSelf posted by Jalindrine at 5/07/2026 11:38:00 AM |
|||||||||||||||||||||||||||||
| Thursday, April 30, 2026 | |||||||||||||||||||||||||||||
|
Claude Sonnet 4.6 is so much better than GPT-5 mini that I figured I'd look up how much it'd cost to swap. Right now, for $10 a month, GitHub Copilot will let you use GPT-5 mini forever, no limit. Sonnet, however, was sucking down my monthly allocation of "premium requests" so fast (it's the end of the month, so I usually splurge on the model) I was scared to look at what it'd cost. Well be even more scared. Come June 1st, everyone gets to pay no matter which model you use. No more infinite GPT mini. And Sonnet's multiplier is jumping from 1x to 9x!! Look, there's also something on the page about going "from request-based billing to usage-based billing". I don't think this model multiplier multiplier [sic] is effected by that distinction, however. Maybe? I think it's the same charges as now, just 9x as quick. Looks like I get 300 credits now and could get five times as many for $40. That's still not much, and I just use Copilot to pair program sometimes. Well, daily, but not agentic. Five times more and nine times as fast equals lots more than $40 a month. I'd predicted prices for AI assisted coding would go waaaaay up soon. Well, I was right, though now, wondering how long this page about charges changing has existed, I might should've know a month ago it wasn't really a prediction. Starting April 20, 2026, new sign-ups for Copilot Pro, Copilot Pro+, and student plans are temporarily paused. Oh. Oh wow. We're in trouble. Labels: ai, copilot, development, hats o' money posted by Jalindrine at 4/30/2026 11:58:00 AM |
|||||||||||||||||||||||||||||
| Wednesday, April 29, 2026 | |||||||||||||||||||||||||||||
|
Note to self: To look through your git history to find files by name (and to have the files edited in each commit listed)... git log --all --name-only -- "**/*Base*" Though note that it's case sensitive, and not because I used a capital B. It's always case sensitive. Looks like there are weird workaround depending on your git version, like not including a glob for filename and piping EVERYTHING to grep to figure out or using git's really unwieldy pathspec. Labels: git, noteToSelf posted by Jalindrine at 4/29/2026 11:35:00 AM |
|||||||||||||||||||||||||||||
| Thursday, March 26, 2026 | |||||||||||||||||||||||||||||
|
From github.com:
This is an exceptionally important announcement, though it's one I've been predicting for a while. StackOverflow is dead, and the bots sucked up all of its knowledge, and GitHub repos' knowledge, and MSDN's knowledge, and... And we wondered how AI would continue progressing if there was no reason to keep posting answers to the net "for free". But it was obvious. Now each AI engine is storing (will soon be storing?) the answer to each question in its own StackOverflow, so to speak, but one tuned for AI, not humans. Every time you give Copilot the thumbs up or positive feedback (or some other way it figures you likely used its code), it's going to file that away as "The Right Answer for You". You have your own Jon Skeet in your workstation in exchange for your answers being in their own paywalled database. (Not that there's anything inherently wrong with wanting to make a buck.) If all the best programmers use Claude going forward, guess where the best answers are going to come from? Or, as it looks like Copilot wants to do, what if all the best answers are stored in Copilot's corpus? Then regardless of which model you use, the best answers (and autogenerated code) to the questions (and prompts that implicitly ask those questions) that used to go to StackOverflow will come from Copilot. That's what's next, folk. Actually, that's what's now. All the knowledge that you helped build if you leave that setting on its default will be behind a paywall. There's a great podcast with Nilay Patel and the CEO of Grammarly where Patel essentially asks: "Okay, [very not] cool, you're using my name and ostensibly my style. How much are you going to pay me for that?" (Though I suppose the opposite is, "You're happily paying $10/mth for Copilot now. You think you could even sniff that magic without contributing your labor? You'd still be posting to StackOverflow, hoping someone would be kind enough to post something useful back, which used to be amazingly common, but when's the last time that's happened for you?" It's an interesting counterpoint. Perhaps we should unionize before they alter the deal any further, like making it $75/mth. Or $175. Or more. Because they could.) Every so often go out to the middle of the woods, turn off WiFi and cellular, and make sure you can still code. And then realize that's not really your job any more. Labels: ai, business, coding, labor, stackoverflow posted by Jalindrine at 3/26/2026 10:45:00 AM |
|||||||||||||||||||||||||||||
| Sunday, March 01, 2026 | |||||||||||||||||||||||||||||
|
Okay, I hit a rabbithole today. I'm not saying it's not fun, but probably not my smartest use of time. Long story shorter than I want, I find myself googling "SSMS equivalent on macOS" fairly often, meaning [Microsoft] SQL Server Management Studio, the Windows-specific tool you use not simply to manage SQL Servers via a GUI, but to throw raw T-SQL at it and view the results. It's barely changed since at least the 1990s. I used to use SQuirreL-SQL on Mac a lot when I dabbled (and also worked!) in Java, which really came in handy once when my boss didn't realize we were installing a Java app dbms onto a Linux-only network, and I briefly enjoyed Azure Data Studio until it got 86'd.
It would probably still work great, but it's frustrating that yet another MS tool got tossed into a VS Code extension. Look, VS Code is cool, but it's not an IDE. It feels like chicken wire and duct tape on a good day. And the last thing I want to do is have MORE things living in this single scripting app. I like dedicated apps, for heaven's sake. But you know what I've done for nearly thirty years now? Written apps that interface with SQL Server! Why don't I just write my own query client for SQL Server! Ah, but with what UI? Originally, I figured why not just the console? In an hour or so, I got a pretty simple client up that would send queries and parse up results into columns of plain text. Not too shabby! My introduction to TUIsBut was that enough? Of course not! We need a true console app, whatever that is, that intelligently formatted results and allowed complex SQL edits, not just line by line input. I started by wading into Spectre Console which allows you to style console text like mad and even has some neat widgets like this table, but it also says it's not really about complex UI management:
Also all its widgets are output-minded, not truly interactive. Okay, fine. Fair. Next up was Terminal.Gui, which seems to be a modern, C#-powered take on the sort of 1980s style DOS apps that you still find in backwater DMVs and tax preparer offices (I'm seeing a TurboTax commercial running during Celtics-76ers making fun of just such a UI now). Which is awesome! Except it was immediately buggy on macOS, and even when I got that working, the first text editing widget I tried allowed text entered to bleed into the widget under it. So that's a mess. Next? I've played with C#'s Insanely. It's insanely tough. I've copiloted the heck out of this today, and, you know, it turns out writing a text editor in a console is a pita. The toughest part? You have to manage all the scrolling. And since you're in a console, you lose all the built in cursor movement... if you want to insert instead of overwrite, that takes some work. And if you want to go to the end of the line, well, the macOS Terminal eats command-right arrow (which means "end") and uses that combo as a shortcut to go to the next terminal window instead. Solutions? Well, rather than reinvent the wheel, I find that
I'm starting to see why vi was born. Though apparently I'm also learning Emacs now too (the above shortcuts are the same in Emacs, maybe?). So throw those in. Awesome! A little esoteric, but that'll do, pig. Except the Meta ones aren't working... Guess what?!
[thanks GPT-5 mini] And there you have it. That's a lot learned today. Not sure I needed the history lesson or to write a scrollable text view for a rich console app, but I've taken on both, nonetheless. Labels: c#, console, macOS, SQL Server posted by ruffin at 3/01/2026 10:09:00 PM |
|||||||||||||||||||||||||||||
| Wednesday, January 07, 2026 | |||||||||||||||||||||||||||||
|
I mean, I already knew (if only based on the hard flattening of my own reputation graph) that StackOverlow was dead, but sheesh. Today I learned... Prompt: how to mark xunit test as do not run but still allow test to be debugged
... or, later...
That second, in my case, does, in fact, work well. Why bother with clicking into SO to search for a good answer when I can have a conversation with AI and prompt my way to perfection? I posted to Mastodon a while back that anyone who thinks we ยญaren't going to have humanoid robots sooner than later is missing the boat. Like different sized railroad gauges determining the size of the trains that use them, or that cars are roughly horse-buggy-sized, or that mobile homes are constrained by the width of our interstate lanes, or... or any other practical standard -- our world is largely human-sized! Not just that chair, but doors, tools, the things that tools work on (eg, nuts and bolts), the cabin of trucks/tractors/fire buckets, If you want to plug a multi-use device into something that can also be used by a human, you should have (among your stable) a humanish-sized model of your robot. Same for LLMs! If you want "compute" to mesh well with humans, you need to create an interface that we already use if you're aiming for quick adoption. Keyboards & mice are good examples -- human hands are insanely dexterous if the keys and devices fit them. And poof, I have an 123 key (give or take) device to create code. And so, no surprise, we quickly went from 0s and 1s to hex to assembler to coding languages that are decent compromises between written language and charted logic. But that's for minutiae in code. If we want to describe at a higher level, we talk about it! You get the point. Anyone who bet against LLMs better not use language themselves either, or they only have themselves to blame. /soapbox Labels: ai, language, llm, noteToSelf, stackoverflow, testing posted by Jalindrine at 1/07/2026 10:56:00 AM |
|||||||||||||||||||||||||||||
| Friday, December 12, 2025 | |||||||||||||||||||||||||||||
|
It's neat that you can program logic on most any computer that boots nowadays. Maybe not crazy UI libraries, but wrap properly factored middleware logic in a console interface or just write some unit tests and you can get a lot done without much compute at all. What's important in a working laptop? I used to look for stuff like replaceable batteries, but with USB-C power packs, that's not an issue if it has a USB-C port that allows power. Now my list is, give or take...
Nice to haves:
My old ThinkPad P51, a serious monster that had a high-def screen and USB-C video output, finally gave up the Windows 11 ghost. The version I'd gotten (used) was, at one point, good enough to run Windows 11, but then was taken off the list! At some point, that was actually enforced and it stopped updating, no security updates, nothing. I got a few more months out of Insider Preview, but then my keyboard and mouse died due to drivers, I spent hours debugging, and I finally gave up. So back in the market. In the meanwhile, I've been using a gaming laptop from 2021 as my dedicated workstation in the home office (and at coworking a little), a super cheap ThinkPad E490s for mobile dev (coffeehouses, trips, and coworking), and my M1 MacBook Air when I need to macOS. These museum pieces do well, and I've never regretted buying gaming laptops, as their CPUs alone give them years of headroom as development boxes. But as it's time to replace both the high-end (gaming laptop is old) and the mobile workstation (P51 is dead), I am stressing too much about processors. I usually check out PassMark scores to get an idea of how fast they are. I don't know if it's accurate or useful at all, but it seems to give a pretty good relative number. Unfortunately I keep forgetting what my current boxes' scores are for comparison. So hard right on this post's topic as we swerve into "note to self" land and record them. (I have a vague recollection I've done this before. Apologies.)
The last two are ones I'm looking at now. LOQ is for sale now for $850, and the E14 as I'd want it is $823.65. Getting back on topic, the neat part is that the E590s I got off of eBay for under $100 a while back and inserted some extra RAM into has been my mobile box for a few months. It's occasionally a little slow, but for logic work it's... just fine. If you've got $100, internet, and someplace to plug in with the ability and drive to learn to develop software, you've got a livelihood. That's kind of amazing. Labels: hardware, laptop, noteToSelf posted by ruffin at 12/12/2025 10:22:00 AM |
|||||||||||||||||||||||||||||
| Wednesday, October 08, 2025 | |||||||||||||||||||||||||||||
|
Okay, if you're Gen X or older, you grew up with watches to tell time. And not just tell time, but to keep your time. You were just as (more?) likely to hear, in the 70s and 80s, someone ask, "What time do you have?" than "What time is it?" because everyone acknowledged that, unless you had the Naval Observatory clock on the phone, that you could be a few minutes off. During a meeting, you could look at your watch not just to see the time, but to see your time. You could leave a minute or two early because "That clock over the door is slow; sorry, have to run." It was socially acceptable. In fact, those are two of the "sore thumb" cultural changes I've noticed in the last 20 years:
But now the Apple Watch, largely through the middle-class & up, near-and-truly bougie culture's emphasis on fitness and measuring EVERYTHING, is everywhere. It's cool. The watch is even always-on now. A few small glances in almost any situation is no big deal. Why is it okay for Gen Z+ers to look at their watch? Why would millennials, who grew up in the period where the time was known, not find watches offensive? They didn't learn to tolerate this distraction like old folk did. I think the answer is that my question is at least partially a false premise: Millennials don't care as much as the older generations if someone has their entire phone out in a meeting. Which is largely because X's grew up in a time when, if you weren't paying attention to the main thing, you were barely paying attention to it at all. You don't bring a newspaper to the dinner table because you would give the newspaper all of your attention. No longer! Now we don't even eat dinner together so we can watch TV and surf. Divided attention is the norm (he said uncontroversially). If anything, a watch glance is less offensive than a phone interaction, which is still okay. What's most interesting, then, is that this is one place where the Venn Diagram, X vs M, has an overlap for completely different reasons. Xers think it's okay to look because of the legacy excuse that you need to know your time and Mers think it's okay because why the heck wouldn't you? At least that's today's working theory. For me. YMMV. posted by ruffin at 10/08/2025 09:54:00 AM |
|||||||||||||||||||||||||||||
| Wednesday, September 03, 2025 | |||||||||||||||||||||||||||||
|
Was writing an email to a buddy who likes sports, and mentioned that I know someone who lives in DC. The balance of the email was about the Football Team, but then I wrote...
And then the textbox on gmail.com suggested "baseball". The Nationals are a baseball team. Nats is the nickname. Now you could convince me that it actually screwed up royally and thought the balance of the email (which I'll spare you) was actually baseball related, not NFL, but there's a non-trivial chance it got that one right. It's going to get to the point we won't be able to tell when someone's going senile based on their emails. Overall super-minor, but the ramifications are actually pretty large. It's reading my email realtime for non-grammatical context, which means it processes even the parts I take out. Is that kept in memory? How long is it stored? Did I sign up for this? posted by ruffin at 9/03/2025 04:57:00 PM |
|||||||||||||||||||||||||||||
| Tuesday, June 17, 2025 | |||||||||||||||||||||||||||||
|
Okay, was looking back through WCF earlier this week for a prospective client, and figured I'd leave some notes. Here's the stock code, give or take:
And all that's in Again, this is the stock WCF project so far. Not overly fancy. I wanted to be able to hit the stock endpoint from a WCF project in Visual Studio without using a WCF client. Getting to the WSDL file was easy: You can steal that from the page the WCF Test Client refers to if nothing else. For me, that stock page was:
Here's some of the startup page's contents:
Then the WSDL itself:
What you want to be able to do to invoke a service endpoint directly is, of course, find its URL. In my case, with a little help from SoapUI, I figured out it was the same URL that started up initially:
The first key is that you have to set up two headers to the request:
But you seem to have to send it a body in a POST -- GET gives you that stock opening page again. (Since GET and POST are REST conventions, I half-way expected the WCF service not to care, especially since we know GET can have a body now.) I am not yet going to claim I know how the WSDL tells you what your input parameters should have looked like.
Again, do this all in a Postman POST request with a body that's raw with XML as its type and you're golden. Change
I do not miss XML. Update: Ha! Wish I'd talked to myself from 13 years ago first! Labels: c#, noteToSelf, wcf posted by Jalindrine at 6/17/2025 07:27:00 PM |
|||||||||||||||||||||||||||||
| Monday, June 16, 2025 | |||||||||||||||||||||||||||||
|
Looking into updating a slew of VB.NET API to C# for a client, and figured I should brush off my VB.NET before getting too serious. And I figured that means I should make a console app, connect to a sample API URI at JsonPlaceholder, grab a collection of entities, serialize them, loop through, and access something on each individual entity instance. That's half (or more) of what any API does, right? Oh wow. Slightly larger rabbit hole than I figured. First, you can't make the top-level From stackoverflow.com:
Can confirm. The right answer is to set up an awaiter in a synchronous [sic] From stackoverflow.com:
It is somewhat amazing how few upvotes these have gotten at SO. Aka "VB.NET was never super popular, relatively speaking [to C#], was it?" Here's some working code.
and the
As I think I've mentioned before, a prof told me in college, "They're all different dialects of the same language." Or as a buddy on the ultimate team said, "It's all zeroes and ones." Nothing fancy going on here, but it does take a while to get your ears tuned to the new (ancient?) dialect. Labels: noteToSelf, VB.NET posted by Jalindrine at 6/16/2025 11:24:00 AM |
|||||||||||||||||||||||||||||
| Friday, May 30, 2025 | |||||||||||||||||||||||||||||
|
Note to self: It's pretty easy to get a Stripe CheckoutSession in .NET. I talked about writing a Chrome extension and integrating payment through Stripe a few months ago. Unfortunately the "what appears to be an amazingly well-written howto" wasn't, quite. So here's a quick bit of play with the Stripe API using .NET. This looks up information according to a "Checkout Session" id, which is what you'll get sent if you set up a "After Payment" processor URL, which is what I'm doing -- for now in an Azure Function, just to be kewl. (No, you shouldn't use hard-coded paths in your code. No, you shouldn't pass around anonymous classed entities in C#. You're right, there's one instance of insanely not-DRY-ness in this code that almost bugs me. And I hate kludging Steps:
I'd been thinking about having a $3/year [sic] subscription for an extension. After a test, I learned what the comments, above, mention: That'll cost me ($3 x .029 + 30ยข somehow equals...) 41ยข [???] per transaction. Okay, apparently there's a "Usage fee" in addition to the charge?
From togai.com:
From bossrevolution.com:
Cool cool. 13 2/3% of $3. Just below Apple's small dev 15%. Good times. Least the API is simple. More to come. From stripe.com:
good heavens. Labels: .NET, c#, example, noteToSelf, stripe posted by Jalindrine at 5/30/2025 01:26:00 PM |
|||||||||||||||||||||||||||||
| Monday, May 26, 2025 | |||||||||||||||||||||||||||||
|
Sometimes, I surprise myself:
Labels: development, noteToSelf posted by Jalindrine at 5/26/2025 03:32:00 PM |
|||||||||||||||||||||||||||||
| Monday, May 19, 2025 | |||||||||||||||||||||||||||||
|
I'd missed the whole Forced Reset Trigger debate over the last year or so, but caught an article about it in The Post Sunday and figured I'd see what it's about. Here's what I learned, executive summary style.
My second isn't quite accurate, but check below and it'll make more sense. First, some YouTube videos and then quotes from an excellent article from the National Association for Gun Rights. The first shows the trigger in action with some slow-motion demonstrating that a trigger pull is required for each round. But it also is what reminded me of bump stocks. Again, it's not. The bump stock would essentially (afaict, ymmv) push the gun back into your trigger finger so you didn't have to manually pull. It looks like this does something similar but you do have to pull the hairiest trigger possible. This one shows me two things: The eyes of the first guy shows it fires lots faster than the novice shooter can normally. The second shooter shows me it does take a knack -- easily achieved, but a knack -- to get it to work. This one, however, is probably my favorite. This fellow shows that he can empty six rounds just as quickly using a traditional trigger. Dude is fast. Now for some quotes from that article from the National Association for Gun Rights. The last one is pretty telling. They're comparing the Force Reset Trigger to a binary trigger, the second of which also increases discharge rate, but in its case by releasing a round with a pull and a release, thus the whole "binary" moniker. But we learn a decent amount about how actual shooters consider the FRT.
That last point (and the "fun range accessory" comment) seem to wrap this up for me. In the wrong hands, a FRT could enable someone shooting at a crowd to cause a lot more carnage than without. For the serious shooter or someone truly interested in eliminating a specific threat, there is no practical usage. That is, unless your adversary was coming at you in waves like an 18-century bayonet charge, it's likely a bad idea to use a FRT for security. Honestly, I'm still surprised we have a sort of bifurcated Second Amendment. District of Columbia v. Heller is described at today's Wikipedia like this:
... but there's also otherwise an argument that anything goes. I mean you can even have a fully automatic rifle (as the NAGR references) if you jump through enough hoops. Okay, I realize that's a law, so not 2nd Amendment protection, but in general it feels like "if the Army can own it, so can I" argument comes up more frequently, like with sawed-off shotguns, iirc. That is, in 1939 SCOTUS said:
But I think I saw an argument that since the Army now assigns shotguns in specific urban missions it's fair game for everyone. But even the text, above, seems counter to Heller: The bar there is "Is this weapon useful to a militia?" not Heller's "Is this something a citizen would have at home and bring to a militia?" Anyhow... And, as I think I mentioned before, years ago I went to a local gun show to see how tough it'd be to get an AR-15 fully auto. There was a bin of the piece that you'd need to replace to make an AR-15 fully auto and a $10 or so book explaining how to do so easily available. For $1500 or so, you could walk out and be an hour or so away from an fully automatic M-16 equivalent. The question of whether a FRT should be illegal comes down to how you interpret Heller. I don't know that Heller is talking gun technology. That is, a flintlock musket or rifle (two different things) are nothing, not really, like even a lever-action rifle today. If you'd had a lever-action from 2020 or 1970 in 1770, you would have been a power like no other, not just for rate of fire, speed of round (so velocity and inertia -- damage), but also accuracy. I think Heller is saying more, "What sorts of weapons do you have around the house today?" rather than "Gun technology stops at 1791". Even then, NAGR would suggest the FRT isn't one of "the sorts of lawful weapons that they possessed at home" when it says "the FRT is often seen as a fun range accessory rather than a practical tool". When it comes to hunting, they add, "When tracking moving game, accurate follow-up shots are often more critical than speed. The binary trigger provides the time and control necessary to line up subsequent shots, whereas the FRTโs rapid reset can make it more difficult to stay on target." But this does argue for the binary trigger being legal, I believe. (Strangely, binary triggers appear to be illegal in Florida and Alabama, among other states.) The weird deal the ATF made with the makers of the FRT is a weird middle ground. I assume it's just a punt. From The Post:
Once the patent or whatever is out, are we back to where we started? Regardless, this seems to support where I think I always end up on this one: If you don't like our current state, you've got to amend the Amendment. Labels: guns, Other Stuff posted by ruffin at 5/19/2025 08:41:00 AM |
|||||||||||||||||||||||||||||
| Saturday, May 17, 2025 | |||||||||||||||||||||||||||||
|
From Hacker News' Malicious npm Packages Infect 3,200+ Cursor Users With Backdoor, Steal Credentials:
None of this is amazing or rocket science, which is exactly why it's important. It's not hard to social engineer humans. It does make me wonder about the almost unthinking preference devs can have for "[I don't care if it's] NIH". Not that it started with But if you want to reduce your proverbial footprint, there are ways. Knowing open-source libraries you use well enough to have contributed is one. Not writing an in-house version of something insanely trivial is another. And, as much as Apple's getting slammed for arguing for its own nanny state right now, using IDEs from fairly reputable sources and not believing deals that are proverbially too good to be true are all probably decent ideas too. I do wonder about, say, browser extensions. I have one from the EFF on one box that I haven't looked into for a while -- is it still be updated? What do adblock extensions really do? Luckily these are all in JavaScript so, even if obfuscated, you can still sniff through most of them fairly easily. Somebody should know, eventually, if the most popular get wacky. Right? Though heaven help me if the right vim plugins for IDEs get compromised. I'm toast. (Told ya it was easy.) Labels: development, npm, security posted by ruffin at 5/17/2025 02:08:00 PM |
|||||||||||||||||||||||||||||
|
| |||||||||||||||||||||||||||||
|
|
All posts can be accessed here: Just the last year o' posts: |
|||||||||||||||||||||
|
||||||||||||||||||||||
|
|
|
|