Posts

10 Things I've Learned So Far in Life

I've learned some things in life. Granted, I don't always put them into practice , but I do actively try . I try not to repeat mistakes, and to learn from my mistakes and experiences. Here are ten things I've learned, and lessons I try to keep in mind. 1. You can be 100% sure of something, and still be wrong. This is something I've experienced myself and witnessed in others. And it can be a good or bad thing. Unlike some of the other things I'll list here, there's not much you can really do about this one. If you have concrete evidence of something, that "100% sure" probably isn't going to change. But in other cases, you may find that you were completely certain of something yet still wrong. 2. Actions taken out of emotion (especially anger) tend to be mistakes. I'm not a biologist, scientist, or psychologist, but as far as I can tell, the only "purpose" of emotion is to influence behavior. And often, influence it not for the better ....

Desiderata

Deisderata  is a poem written by Max Ehrmann and first published in 1927. I first heard it…on a Leonard Nimoy album, where it was called…(sigh) Spock Thoughts . It was a short time later when I found it as text inside a greeting card when looking to buy a birthday card for someone. I had no idea that it had existed beyond (and before ) Spock Thoughts . Years later, I had a poster of it, which hung in one of my offices at a prior job. I find it to be wise advice (though your mileage may vary with the line concerning God). Here it is in its entirety, as it entered the public domain a few years ago. In the original printed version, it was all one paragraph, though in later versions (such as the aforementioned poster) it will often be broken into separate sentences based on theme. I’ve done so below. Desiderata Go placidly  amid the noise and the haste, and remember what peace there may be in silence.  As far as possible, without surrender, be on good terms with all persons. ...

Sometimes, Good Things Come Out of Not-So-Good Situations

In my post-high school/pre-career years, I used to hang out at a pool hall. I've mentioned it at other times on this blog. One night, while hanging out in the arcade section, watching Jen Monti play Hard Drivin' , I turned to find that the girlfriend who had broken up with me a few months back was standing there. She used to hang at a pool hall too, a different one, and what I learned later was that there was some sort of issue that had caused her crew to not want to go to that one anymore, so the fallback was the one where I hung out. It was awkward. I couldn't look at her, a point she noticed and mentioned later to a mutual friend. It's not that I harbored any ill will, I just didn't know what to say. At that age, I was doing the best I could, and I’ll admit that, often, it wasn't good enough. That was the case that night. At 21, we don’t always handle things the best way. But as the days and weeks went on, I didn't want that awkwardness to continue, so I ...

Revisiting "Classic Queen"

Image
I have an older cousin who, when I was a teenager, gifted me her old turntable (which was outdated at the time, but has somehow made a comeback), complete with built-in 8-track player (a technology I am sure  is never coming back). Along with it were a handful of 8-track tapes, most of which I had no interest in, but one of them was Queen's The Game , which included a song I'd at least heard  of, "Another One Bites the Dust". So I listened to that one. It was my first exposure to Queen, and I remember really liking some of that album over the summer I listened to it. In particular, the songs "Need Your Loving Tonight" and "Crazy Little Thing Called Love" were favorites of mine. One of the songs got chopped off halfway through due to the 8-track format, ending on one track and resuming on the next. Very awkward. Despite liking some of this album, I didn't really become a fan of Queen until I saw Wayne's World . I'd heard "Bohemian R...

250

Image
"A republic, if you can keep it." -- Benjamin Franklin  

The Music Man

In my senior year of high school, I started hanging out with this guy named Mike. For the life of me, I can't remember how it started, because Mike and I weren't in any of the same classes, and now that I think of it, I have to wonder if it was through a mutual friend, Chuck. But I'm only a few sentences into this and already rambling. Mike's older brother was in a band, and Mike and I auditioned to join. This sounds fancier than it was. I played bass, Mike played drums. It was through Mike's brother and his band that I met Bill, the topic of this blog post. Bill was the singer in the band. Just a few years older than Mike and I, Bill had an encyclopedic knowledge of music, specifically hard rock and heavy metal. His enthusiasm and love for it was contagious, and I always enjoyed talking music with him. He seemed to know everything about every hard rock or metal album from the 1970s to the current day. I always thought he should've written for a rock magazine. N...

Mocking httpResource in Angular

httpResource  is still experimental in Angular, and I've begun playing around with it. Once I got a working implementation on a simple form, I wanted to update my tests. This was challenging. I did some searching and found a couple of posts about using HttpTestingController  and mocking a response, but I wanted to retain the service-level abstraction in my component unit tests, which know nothing about HTTP, only that services are used, and one of them now returns an HttpResourceRef in place of an Observable. Here's the mock implementation I wrote. I'm using Vitest now in this project instead of Jasmine, but the syntax should hopefully still make sense. class ExerciseServiceMock {   get = vi . fn (). mockImplementation (() => {       const paginatedResults = new PaginatedResults < ExerciseDTO >();       paginatedResults . totalCount = 0 ;       paginatedResults . results = new Array < ExerciseDTO >(...