Skip to main content

Posts

Using an Array of Objects in C++

 I've been programming for years (over 35 at this point, which is crazy  to think about). My career right now is much more Software Architecture, and much less Software Developer, but I still get some time to write out GraphQL APIs in TypeScript, Vue 3 UIs, GitLab pipelines, and just generally making "big" decisions and helping make them a reality. It's nice every now and then to come across different articles and ideas that get me to remember life in college when I was using C++. Who would have thought C++ was the "hot new thing" right now (though I suppose it's more like Rust and Go, both great languages as well). One of the things I find frustrating with most technical posts is where they focus on the "how do I build an app" and not so much on "how do I do this one slightly useful thing". I figured I'd throw one together what was front of mind, using user attributes for permissions (i.e., Attribute Based Access Control - ABAC) ...
Recent posts

Mitigating Spamming

I've had yet another person get stuck with a spammer using their contact list and sending spam task though they were the person. It happens so much, and the Internet seems to have so many different answers, I figured I'd send this consolidated list over to him, and share here. Short answer A few big spam companies get your email list from finding the email addresses of your friends on Facebook that publicly list their email address. They also get it from forums you post to, your blog (emails are often listed there) and forwarded messages from someone else. Those spammers then sell the email lists to other people. Change your password often. It’s not foolproof, but is a good idea. Also make your email password different from all other passwords you use on the web. When registering for sites, use a throw-away email address and some password. Or make your current email a throw-away and make a new email account that you tell your friends to use (I made my Yahoo a throw-awa...

AutoMapper from a List to Class Properties

I just found AutoMapper , a tool I wish I'd had years ago. This can take any of you classes and translate them into another class. This would have been especially useful when I've had to get an object out of and EntityFramework, and add in additional properties before display, which happens quite often. The code for this is pretty simple, an well defined on their site. I came across AutoMapper from my wife last week, and found it to be a perfect fit for on of my current issues. We're getting data from a Web service that has an Object and a lit of properties with their values, like the following. I needed to easy map each property to my display object type. There is the option of using reflection ( Looping through Object's properties in C# is an excellent example), and looping over each of the properties in my destination object, and filling them from values in the source object. Honestly, I did head down this path a bit, but realized I needed a more flexible so...

Dry Ice

What does Dry Ice evoke in you? For me I remember clearly selling popsicles at my middle school Fall festival and being reminded constantly not to touch the dry ice, sine I would burn myself. How could ice burn? At some point I did touch my arm, and man it hurt. At the same time, this was the greatest stuff ever, ice that didn't melt into water, and that could burn. Is there anything it couldn't do? Heck, I just read an article about the Orbit , a portable washing machine that is in development and uses dry ice to clean clothes. It also smokes and makes crazy awesome bubbles in milk and soda. About last Spring I started following the Penguin Dry Ice blog. This s a great place to get information about how you can actually use dry ice. For example, it's a great alternative to regular ice for any coolers, so long as you separate the ice from the food. I had food on top of the ice, and it froze. Turned into freeze dried fruit. I'd never considered it before since I a...

Potty Accidents

While we still struggle with accidents, we've tried a lot of different ideas, therapists, doctors, tests, anything. While we still haven't nipped this in the bud, we do seem to be making progress. A lot of this is thanks to reading It's No Accident: Breakthrough Solutions to Your Child's Wetting, Constipation, UTIs, and Other Potty Problems by Steven Hodges and Suzanne Schlosberg. It's no secret, they believe most (almost all) kids who have accidents at night or during the day are due to constipation. More specifically, our kids aren't getting enough fiber in their diets (all kids really) and so a lot end up with poop stuffed all in the their colon and the intestines, never really clearing out. So even though kids poop daily, it still doesn't ever clear out. We haven't gotten to doing an enema or Miralax yet, we really need an X-Ray anyway and to see the doctor again. But adding fiber has definitely made a different for both kids. If you are jut beg...

Best Free (or really cheap) Activities in DC

Growing up in DC, I had a LOT of time to wander the city, by foot, car and Metro. Here are some of the most memorable things I recommend everyone does. I still don't get tired of doing them. Smithsonian It wasn't until College when I spent a semester in London that I realized all museums were not free. This is because everything at the Smithsonian is free. It is, without a doubt, the most complete education you can get for free. History, Culture, Art, Nature, Space, Technology... everything is covered. And it isn't just pictured on the walls, they have activities for kids, family and adults all the time. While there are obvious options, like the Zoo or the Natural History Museum, I and my kids definitely recommend the following places to visit. The kids are still talking about some. Natural History Museum I know I mentioned it as obvious, but I can't overstate how incredible this place is. You should definitely check out the insect exhibit, with LIVE insect...

Kids Activities

I find myself often in a situation where it's some morning, I have the kids for the afternoon, and I'm not sure what to do with them. We could go to a movie, or play Legos, but living near Washington, DC, I want the kids to love the museums as much as I do, or to see what else is going on. This Sunday, while my wife was travelling, I took the kids to the Chocolate Festival in Old Town Fairfax. I didn't even know there wad an Old Town Fairfax, much less a chocolate festival. It was okay overall, but the best was seeing any type of chocolate you could imagine, and letting the kids pick something for themselves and their teacher. For finding cheap or free stuff going on nearby with the kids, I have to say About.com has consistently been the best. I tried si.edu (the Smithsonian Website) which is also good, but a little hard to navigate, partly because they have so much going on. At About I did a search of what to do with my kids this weekend, and a bunch of items came ...