A quick take on Java Records

In July 2022, I put together a “Lightning Talk” presentation on Java Records for my employer, InRhythm. In short, Java Records are a new data type added as a permanent feature in Java 16, with the goal of reducing some common boiler plate code. In particular this makes writing simple DTOs very quick and easy. You can check it out below:

Lightning Talk | Java Records | Ted Parton

Though I have only played with Java Records on a pet project for this presentation so far, I plan to dig into them more in the future.

References I leaned on for this talk:

You can access code samples from my talk at: https://github.com/tparton42/evette

Portable AC Vent Box

A few years ago I purchased a Whynter Portable AC/Heater for my deck. The included window brackets never fit quite right, but I made finagled them to work. When COVID-19 hit, I ended up moving this unit to my home office as it is always several degrees warmer than the rest of our house. Again, I had fit issues with the plastic window vent frame, the summer of 2020 I bought some foam insulation board and cut it to fit the hose mount. This worked so-so, but I was never very happy with it.

After purchasing a Prusa MK3S+ 3d printer, I decided to try my hand at designing a box/frame system that would allow me to easily fit both my interior window and my deck window. So in the winter of 2020-21 with the help of TinkerCad, I designed a series of interlocking rectangular boxes/wings, and rails. I ended up with what I think was a really great design, and I used this new box throughout the spring, summer, and fall of 20221.

As a long time Thingiverse user, I decided to share the designs with my fellow makers. After many long delays, and spending some time to make pictures and verify which STL files to include, I am happy to announce that I have submitted my first public design to Thingiverse for my portable AC window slide box. You can find it here: https://www.thingiverse.com/thing:5257561

My portable AC connected to the hose box I designed and printed.

Below are some of the CAD images

Happy 2021, welcome to the new site!

Happy 2021 everyone!

I have started the transition from my old ColdFusion based blog software to a WordPress based site. I have transitioned some of the old blog posts, but still have several to import. As part of that process I am having to massage some of the old posts to ensure formatting looks right, and things like code snippets appear correctly. I may also play with the layout and style theme a bit, but for now, I am keeping it simple.

For the upcoming year, I have a few topics in mind to blog about. Over the past few years I have gotten into 3D Printing, but have not blogged much about it. I may start sharing some experiences on that front. I have an ideal for a new web-app to help folks with 3D printing, and so I may discuss that as I build it.

Here’s hoping that 2021 is much better than 2020 and talk to you soon!


New site coming soon!

Good news, I am in the process of transitioning away from BlogCFC. I am still debating between WordPress and Blogger.

Blogger seems fairly simple and right down to business with few frills and add-ons. Which for someone that infrequently blogs (like me) it might be ideal. WordPress on the other hand has a lot of options, add-ons, style packs, and a lot of articles on managing.

So the last few years, I have been pretty covered up with family, work, and just living. But I do have several topics that I think would be good to expand upon.

Some upcoming articles will likely include:

  • Long term review of Tesla Model 3. I have owned one for close to two years now. I still love it, but feel I should give a run down of that.
  • Experience with Paint Protection Film.
  • Experiences with 3D Printing.
  • Personal coding projects — I have a few in mind, and am thinking I will blog about the progress or bumps in the road.
  • Role Play Game system reviews.

My Tesla Referral Code

Hello Readers! If you enjoy reading my blog and you are interested in purchasing a Tesla car or solar panels, please consider using my referral code. If you do so before September 16, 2018, you can unlimited Supercharging for any vehicle you purchase (i.e. Model S, X, or 3).
I do not have my Tesla Model 3 yet, but I have configured and ordered one. Now I am waiting (somewhat) patiently for delivery.
Until next time… Cheersn

Long-Term, First Generation Nissan Leaf Review

Way back in January 2014 I picked up a Silver Nissan Leaf (2013 model) assembled at Nissan’s Smryna, TN plant. Due to concerns over how I would like a Leaf, or any electric car for that matter, I went with a two year lease. At the time I was convinced that within 2-3 years there would be a lot more EV choices available in Tennessee and the rest of the country.
Boy was I wrong on how long it would take auto manufacturers to start releasing compelling all electric vehicles all over the United States. Heck, even Nissan took what seemed like a long time to increase the size of their battery packs.
Fast forward to August 2018, and I still have the 2013 Silver Leaf I had originally leased for two years, thanks largely to deals that Nissan offered me to extend my lease twice. I have about six months left on my lease and will be returning at the end of the lease. So I thought I would take a few minutes to reflect on the Leaf, now that I have driven one for about 54 months.
Things I really like/love about my Leaf:
  • The fact it doesn’t use gas!
  • The instant torque! I still get a thrill when punching the accelerator.
  • How quiet it is. I disabled the startup sound and freaks my first-time passengers out when I start driving and they didn’t know the car had been started.
  • Nimbleness – it is easy to move it in and out of traffic both in town and on the interstate.
  • Heated Steering wheel and seats.
  • Storage space – it can hold more than your eyes think it can.
Things I think could be better in my 2013 Leaf SL:
  • Active Thermal Management for the Battery Pack. Sadly, th e 2010 thru the 2017 model Leaf’s use of only air intake to cool the battery pack has to lead to high battery degradation.
  • Interior issues – some portions feel cheap, and several places do not fit well.
  • Seats – fine for short commutes, but not so great for longer drives.
  • Lacks support for playing audio from Android devices over the USB port. But you can use Bluetooth, if equipped.
  • NissanConnect service – I could write a whole blog post on issues related to this. It had such promise, but has been a big let down.
  • Cup holders could be in a better place. And are in a better place in the 2018 model refresh.

Overall, I have been pleased with my decision to lease the Nissan Leaf. I still enjoy driving the Leaf and enjoy how smooth it rides. I feel a little let down every time I have to drive a combustion engine car these days. I have had some battery degradation, and now can only get about 65 miles on a full charge. Quite frankly, the Tennessee heat is just too much for air-intake only to cool the battery pack. Nissan Leafs have suffered much heavier degradation than their competitors that use active thermal management. I believe that Nissan is going to have to up its game here in order to remain competitive, otherwise it may lead to mostly one-time only owners.n

In my opinion, the 2010-2018 model Nissan Leaf’s are great commuter vehicles if your round trip is less than say 60 miles or you have access to a EV charging station at work. Since many first time EV owners leased their vehicles, you can routinely pick up a used one for around $16k with all the bells and whistles. A slightly used Leaf may be a better deal than a brand new one, even with the federal tax rebate.
Until next time… Cheers!

Why I leased my 2013 Nissan LEAF

In January, 2014, I leased a 2013 Nissan LEAF SL. I had never leased a vehicle before, as by and large I believe that it is generally a better deal to purchase and drive a vehicle for 7-10 years. But I was intrigued by the concept of an all-electric vehicle. While come states such as California, Oregon, Washington, and Georgia had several options for an all-electric vehicle in 2014, sadly Tennessee and most other states had few choices. At the time, I could only test drive a Nissan LEAF. I could have ordered a Tesla Model S, but a new one was out of my price range, and there was no such thing as a certified pre-owned at the time. My options were very limited, unless I wanted to go to the hassle of buying in one state and transporting to another.

After looking over the Nissan LEAF and talking to a friend who had leased one seven months earlier, I decided that perhaps I should lease a LEAF as well. I decided on leasing because:

  • I was unsure how I would like being limited to a 75-80 mile range.
  • I was unsure how I would like driving a smaller car (my previous car was a Honda Accord Hybrid and before that an Isuzu Rodeo).
  • I had no idea how long the battery would last.
  • I had no idea of how well the cars would retain their value. After all they had barely been on the market 3 years.
  • How quickly is the technology changing? I was already reading rumors of a planned larger battery pack, and that Nissan were hard at work on a second-generation LEAF.

I decided that since this was still an early adopter item, perhaps it was best to lease. My original lease term was for two years, but six months before my lease term ended, I was offered a great deal to extend my lease. I could get two months free and keep my same monthly rate, plus I would be given an extra 12,000 miles. My monthly lease payment was about $100 a month, and the idea of driving the vehicle for an extra year for less than $1200 was appealing.

Fast forward three years, and I still believe that leasing of first generation all-electric vehicles is probably the smart thing to do. I will elaborate more on that in a future post. My only real regret with leasing is that I have constantly been on the lookout for what is going to be available in my market when my lease is up.

A Note on my lease: This was my first lease and I did something most people do not do. I traded in my previous vehicle and applied the entire trade-in value (a bit over $6000) towards buying down my monthly lease payment. Either way it would have averaged out to roughly $357 a month. What I didn’t know at the time, is that generally you do not want to put a lot of money down on a lease, if the car is totaled in an accident or stolen, you are out the cash you have already spent on the lease. Now that I know this, I probably would not make a huge payment at signing on a lease.

Checking for constraints in SQL Server

n n From time to time, you may find that you need to test for the existence of a SQL Server table constraint before you perform some action, such as dropping or altering a constraint or table. Below is a snippet I have found useful.

DECLARE @constraintName varchar(200);
SET @constraintName = 'SomeConstraintName';

IF ( SELECT count(*) FROM sys.objects 
AND OBJECT_NAME(object_id) = @constraintName) <> 0 BEGIN
PRINT 'FOUND Constraint: ' + @constraintName;
-- Perform some action...
PRINT 'CANNOT FIND Constraint: ' + @constraintName;

BTW, I got the idea from this snippet and based it, on this StackOverflow article: https://stackoverflow.com/questions/2499332/how-to-check-if-a-constraint-exists-in-sql-server Enjoy!

LEAF Owner Tips: Charging in Cold Weather while away from home.

When I first got my 2013 Nissan LEAF, it was late January and the day I took delivery the temperature high was around 32 degrees Fahrenheit. That night on my way home I had to stop at a quick charge (CHAdeMO) station. I didn’t know how to get the climate control to turn on while charging and as the temperature dropped into the teens, I only charged long enough to make it home.

Shortly thereafter, I figured out that one of the easiest ways to get heat is to use the CarWings mobile app to turn the climate control on remotely. That said, I also recently discovered that it is also possible to do this without the mobile app. So, if you press the start button, without your foot on the brake, the car goes into a mode that allows you to use the radio but will not allow you to control the climate or windows. But, if you press the start button a second time, you have full control over the climate control.

A couple of days ago, I encountered two LEAF owners using a CHAdeMO unit and they either didn’t know how to engage their heat, or decided that ~30-degrees after dark wasn’t that bad. While I used the other CHAdeMO unit, I thought it might be a good idea to share this tidbit.

Nissan LEAF: My Top 5 Favorite Things

After nearly 11 months of driving a Nissan LEAF and 5600 miles logged, I thought I should share my 5 favorite things about this BEV (Battery Electric Vehicle).

  1. Instant Torque… this baby can really zip around town, especially when not in ECO mode.
  2. Runs solely on Electricity!
  3. Low Maintenance.
  4. Climate Control* and Heated Steering Wheel & Seats (all seats)
  5. Lots of cargo space.

* I find the climate control particularly great because you can schedule the days and time for it to come on. For instance M-F, 10 minutes before you have to leave for work. Additionally the with the CarWings App, you can turn the climate control on with your smart phone. Last, but not least, if your car is plugged into your EVSE (charger), and you turn the climate control on from your phone or schedule it, the car will draw power from the charging unit rather than your battery, thus conserving driving range.