Sunday, April 28, 2024

Puppies turn yard into a sandbox

 We love our puppies but they turned their outside area into a sandbox.  They then drag in so much sand into the house you have to sweep at least 3 times a day.  We decided to try and bring in some sod (Zoysia grass) in an attempt to reestablish some grass.  After some research, Zoysia seemed like the best fit for our area and need.  We ordered a pallet of it (500 sq-ft).


Here is the puppies sandbox they created.


Here is the sod'ed area.






Here is the pallet of sod we received.  We could have used more but this was a good start.


Deuteronomy 28:3

“Blessed shall you be in the city, and blessed shall you be in the country.

Thanks for reading!

Scott

Saturday, January 13, 2024

Super stretch puppy

Is that puppy under the couch really that long??  Wow..



Ok, maybe not THAT long.. caught both of the pups napping in just the right spots for a funny pic.


James 3:7

7 All kinds of animals, birds, reptiles and sea creatures are being tamed and have been tamed by mankind,

When puppies get bored.. sigh.

 So I left them alone for 30 minutes while I worked in my office.. They knocked over a chair and also chewed up a new TV remote.

Will probably buy a couple extra remotes now..


The good news is they didn't swallow the batteries.. just chewed a bit.




Thanks for reading.. come back again for the an episode of "dogs gone wild".  


Genesis 1:21

21 So God created the great creatures of the sea and every living thing with which the water teems and that moves about in it, according to their kinds, and every winged bird according to its kind. And God saw that it was good.

Saturday, December 30, 2023

The bad water heater that wasn't: A Disconnect

 We were out of town for a few days when my parents, who were puppy sitting, let us know that our water heater stopped producing hot water.  "Great.." is what went through my mind.  When we got back, I did some checks on the water heater.  The smart controls were blank. My non-contact voltage tested (which is all I could find that second) indicated that power was getting to it at the wires entering the water heater. I even verified that power was getting to the elements - but no hot water output.  So I assumed that lighting or a surge fried the electronics. 

I would try to fix myself but no replacement parts at the local store. I didn't want to call a plumber - the cost at that point would be close to replacement cost of the water heater.  So I did the next best thing. I bought a new non-smart water heater. I turned off the breaker and installed over a couple hours.  Hours later, as I went to test and enjoy the fresh hot water - I was disappointed.  There still wasn't any hot water.  What?

I searched around and finally found my multi-meter and checked  the electrical.  I was only getting a few volts instead of the 240v I expected.  So it did have power but just barely.  So I checked the breaker and it had 240v as expected.  I also had a disconnect switch for the water heater that I had installed next to it.  I went to pull the disconnect out and wasn't able to. At that point, I figured that was a bad sign and related to the issue. I ended up breaking most of the surrounding plastic face for the disconnect. I finally was able to get to the internals and found that they were melted and the metal switch pieces were not touching correctly. 

Once I finally extracted the rest of the parts, I could tell that one of the screw terminals must have loosened and then heated excessively - melting the supports and causing the remaining metal to lose further contact.

A trip to Lowe's got me a new disconnect box. After installation and a "good tightening", we finally had hot water.

Here is a picture of the melted disconnect switch parts.



This was an inconvenient problem but we were blessed by the fact we didn't have a house fire which this could easily could have produced.

Hope your day is blessed. Thanks for reading!

Scott

Tuesday, June 6, 2023

JSR 376 / Java Platform Module system and Service Loader experience

 I have some pet projects I work on and I decided to convert one from a plain Java project over to using the Java Service loader and the Java Platform Module System.  The project uses a few well known libraries but isn't using Spring or other giant frameworks. I figured this should be pretty straight forward to do.

I started by converting over to the Java Service loader and after a bit of refactoring I got that working pretty well.  I expect anyone trying to convert an application or service over to it will find plenty of things that should be refactored to make it work well. It was a good experience though even though it was a good amount of work initially.

And then I started the conversion to the Java Platform Module system.  This was pretty difficult to get started and required more work and refactoring.  Some issues may simply be tooling issues in Eclipse or something along those lines.  For my first attempt, I eventually bailed on it and started from scratch again. 

At this point, I did make lots of good progress. I had things pretty much sorted out except for one thing. I had a problem with the Infinispan cache and the module system.  I didn't expect that and I tried all kinds of things to get past the issue.  I eventually ended using the JSR 107 Cache-api to abstract as much as possible from Infinispan specifics.  At this point, I expected it to work but I finally ended up at a particular error. The error indicated that there was an Infinispan package name that existed in two different jar files (with different classes) and that isn't supported by the module system.  I thought maybe it was a regression or small oversight - I mean, the module system has been around for some time now.  

I did a search of Infinispan issues for JSR 376, Jigsaw and platform module system but found no issues.  I finally put in an issue and the next day the tech lead closed the issue as a duplicate.  The original issue was reported by that tech lead back in 2019 as a high priority ticket.  If I had searched for "module", I probably would have found it.  Anyways, being that this was known since 2019 and the original ticket mentioned more packages that were split between jars - I am guessing this won't end up fixed anytime soon.

I removed Infinispan and am just using the JSR-107 support as a way to hide my use of a simple map for in-memory use for now.  I wanted to persist my data (which was a key benefit of Infinispan) so I briefly looked at creating my own file based persistence layer using some plain IO stream support along with protobuffers but even that had some issues.  

I'm planning to switch to ASN.1 - that is more standardized and has better "enterprise support" than most of the other serialization frameworks. Try finding active open source projects for "serialization" from google results related to that.  There are a few but there are many more that seem pretty dead. ASN.1 isn't going away anytime soon and there is an active Java project supporting it (along with many other language projects).

Thanks for reading!

Scott

[2023/06/11 Update] I'm coming to the conclusion that using the Java Platform Module system is both too high of a risk and too painful to do for any large software system. It is a risk because you can't guarantee it is going to work in a fully modular system because so many libraries and transitive dependencies are not modularized and/or have split packages. Based on how long the feature has been around, I don't see the situation improving without some major push that forces it. Trying to use Maven plugins such as "moditect-maven-plugin" and the "jlink" tool is way more effort than a short or mid-term payback would make worthwhile. Working with this tooling and trying to resolve the issues one at a time is a huge headache - certain errors are not found in a deterministic fashion. This means that you add a "fix" into the config and rerun your build and you don't get the error but you end up with a different one.  This doesn't mean you fixed the original error, it just means that it didn't pick the same problem point to report on.

I'm also rethinking the ASN.1 conversion. I was able to get the asn1bean project compiled (i.e. the ASN1 Compiler part) with Java 18 with some effort. I'm still determining if the generated code will really work the way I need/expect it to.  I've got some other things I want to work on now so maybe I'll come back to it later.


Jokes for my kids

My kids like to grown at my "bad dad" jokes. I come up with quite a few but I tend to quickly forget them before sharing.  I hope to capture many of the jokes here so they can be shared later.

  • What did the sheep say when a pig told them that all the cows got stuck in the mud by the pond?
    • The sheep said that is a "Cow-tastrophe".
  • What did the carrot say to the mature green onion when it saw containers of new onions?
    • You should be proud of your bunches of "bunches of [baby] onions"!

Here are my Chick-fil-a jokes from some time ago.

Random ideas and questions

  1.  Since the gravity from a black hole pulls in both light and matter, how might someone determine the effect on matter as it is drawn into a black hole?
    1. Could quantum entanglement be used? If two atoms were quantum entangled and one was released into the gravity of a black hole could you monitor the remaining atom for changes in spin patterns as the other atom is drawn into the black hole? What about trying to change the spin of the local atom and determine if there is any type of resistance to change in the spin? Would we even know if/when the quantum entanglement was broken or disrupted?
  2. Every CNC type machine I am aware of uses electric motors (servo or stepper) to drive a screw rod which then moves a platform or device. As the desired max distance increases, it becomes more difficult (or expensive) to handle larger speeds due to rod "flapping" (over a distance without any intermediate supports). Thicker/stiffer rods or reduced speeds often help. Is there a potentially better method available?  Maybe an electric motor with a hollow threaded shaft mounted to the platform instead? So instead of the long threaded shaft spinning, the electric motors threaded shaft spins and moves the platform along the threaded rod?  Downside is extra weight of electric motor on top of the normal platform/device weight. 
  3. Homes have all types of appliance that either generate, consume and/or move heat from one place to another; Clothes dryers create heat, hot water generation creates and/or consumes heat, refrigerators and HVAC move heat between locations. Would it be useful/possible to design homes with a "central heat exchanger" where waste heat could be transferred to devices needing heat? i.e. Heat produced by a clothes dryer might get transferred to a water heater instead of directly vented to outside a house. This might need intentional design support for appliances and there are likely issues with "dirty sources" like lint in dryer exhaust. Probably many other issues I'm not thinking of this second.
  4. Hot water is useful and needed for many things - showers, baths, washing dishes/clothes, pool heating, etc. In warm climates, using some form of solar heating of water usually involves use of some type of plastic piping, etc which is directly exposed to sunlight - where the heat transfers through the pipe into the water/liquid which then is moved somewhere else for use.  The piping outside is usually on a roof or possibly even taking up space in a yard.  Instead of having external piping, would it be efficient enough to use attic space?  The roof area is typically pretty significant so a huge amount of piping could be run in between rafters/trusses. Lack of direct sun reduces efficiency but the larger area and tendency to retain heat may make up for it - although cost may be a limiting factor. I also wonder if using the "waste heat" from an attic may provide a benefit of lowering cooling needs for a home? There would be obvious concerns about leaks in an attic but I wonder if techniques used for joining pipes for underground geothermal lines might work well. There is also the "my roofer used too long of a nail" type problems to avoid.
  5. If small drones were combined with helium "balloons" for lack of a better description and light weight, flexible solar panels with power storage - could it maintain flight for weeks or more? Could modular, self-assembling floating platforms be created from groups of drones? It would likely need some sort of method to prevent "flapping" of the joined drones - maybe some sort of torsion bar joined across the drones.  I visualize this like torsion bars in cars and trucks. I don't consider this "floating" drone as a close cousin to blimps, etc - it would be more aerodynamic and suited to maintaining its location with relatively low power consumption.  Applications of this might include long term monitoring of beaches and shallows (for sharks, etc), wildlife movements (pythons in Florida, turtle nests in remote areas), security, ground monitoring (sinkholes?), disaster relief deliveries, search/rescue, etc. Some domains are likely better handled by simpler technology so this would be more specialized. Domains of use should require fast setup, easy to relocate/remove/replace, reduce danger to human life for placing/operating/monitoring.

Monday, April 10, 2023

Selecting technology for a software system


Selecting technology for a new software system is challenging. There are very diverse technologies available and opinions on each are equally diverse. You may find some people with the opinion that the selection isn't hard because there is only one good choice (or close to it) - in their opinion given their requirements and assumptions.  

Why do I feel the selection is difficult? There are a number of reasons. 

  • Is there a perfect programming language for all needs?
    • No; each language has trade-offs.
  • In a number of cases, a specific language may be a good choice but you also need to consider different runtime environments for a language and the inherent trade-offs.
  • Different business domains / uses may match up better to specific languages or technology stacks.
  • A language / runtime isn't a solution on its own; you also need to consider the overall environment in which the software will operate.
  • Some software systems require higher security and some technology stacks are more mature in that area.
  • Some systems are especially sensitive to the speed of implementation.
  • The expected lifetime of a system and maintenance needs affects choices.
  • The maturity of the 3rd party ecosystem for a language / tech stack affects choices.
  • Another item which tends to be considered but usually without thinking about it is - what languages are your staff skilled with?
  • And then you have the choices affecting performance, scalability, reliability, cost, etc.
The above list is a bit abstract in nature.  What are some very real and important examples?

A common language that comes up often as the "golden choice" is Python. Is Python a good language - yes, for appropriate uses/domains.  I won't dive into what are good uses for it, I tend to prefer knowing how to rule out items so I can get to a short list for final selection. In the case of Python, what aspects are worth considering? 
  • Memory handling
  • Threading / Giant lock
  • Build time / dependencies
  • Backers of the language
One aspect of memory handling that is problematic (at a minimum for CPython) is that there is no control of limits by the runtime system. In standalone / local applications, this isn't a huge burden but if you are using a containerization / orchestration type systems such as Docker or Kubernetes (K8S) then you run into a dilemma.  Docker / K8S enable you to set memory limits and when those limits are exceeded, generally the container is killed and restarted.  The CPython runtime isn't aware when there is memory pressure and isn't tuned to attempt to prevent over-allocation.  To prevent containers from over allocating memory and being killed - more headroom memory is needed per container instance.  This can reduce the efficient use of memory which increases cost.  If you try to run more CPython processes in a container to improve generally efficiency - you can cause more workloads to restart due to a single over-allocation. The result is poor user experience. Increasing the number of container instances requires adequate memory for each which translates into higher costs.  

CPython also has a giant lock which impedes its multi-threading capabilities (Python GIL / Threading). So managing high request rates in a web application may provide some challenges. You may think it is easily resolved by use of some messaging type system (maybe Kafka, MQ, etc) but if the client libraries don't work-around the inherent issue then you end up with problems that may be hard to diagnose and even harder to fix. 

If you are using a standard interpreted version of Python then you don't really need to worry about build time related to your actual code but you may need to deal with the time required for building any required native dependencies. There are many libraries that work with Python but they are implemented using native libraries which the Python runtime loads and uses. This often means you need C/C++ and / or other compilers to enable building the native libs. This can be slow and error prone when working with containers initially. Given time and effort, you can create a solid build process but this is something that brings the overall complexity of creating, containerizing and deploying a software system to levels similar to compiled languages.

Every popular language remains popular by changing enough to meet new needs and challenges in the software development ecosystem. In some cases, languages are backed by committees (C++) and others have a community/large organization as the primary backing (Java, .Net). For Python, Guido appears to maintain primary control and he has done a wonderful job. The question is - someday, when Guido decides to step away completely - who or what controls the direction of the language and will it diverge much from Guido's current direction?  One link regarding the "no future Python 4" path is: No Python 4.
If you invest heavily in Python and something changes significantly (and quickly) then it could be very costly to change. At the same time, if a language looses popularity after its creator moves on then you may also be in a bad state.

The above coverage of Python is mainly targeted at CPython. The analysis for a different runtime, such as Jython, would need an independent review.  Performance, backing/maintenance and implementation details can be very different.

Another common language stack is NodeJS / JavaScript. It is often touted as high performance and has a large ecosystem of 3rd party libraries.  What aspects of this might affect the consideration for some software system?

Two item that comes up regularly for me are
  • The maturity of the 3rd party ecosystem. 
  • The expected lifetime of a system.
The problem I tend to run into is that there are many 3rd party libraries but the quality differs drastically and the long term support/maintenance of some frameworks is lacking. If you have a system which you expect to maintain for 5-10 years then you probably want to base it on technology which gets continued incremental maintenance over time.  Relying on unmaintained libraries and frameworks when security is important seems like a poor bet. You also don't want to do massive rewrites of a system every year because some new "great idea" arrived.  I've run into situations where core libraries used in NodeJS applications were abandoned by authors in favor of other completely different solutions.  I'd even agree with the authors decisions to abandon something which was no longer a good fit - but it isn't a good place to be in if you heavily rely on that software in a large or complex system.

Another popular language is Java - what are some considerations for it?
  • Speed of system implementation
  • Business domain for new system
Java is a good general language but it isn't normally considered as the first choice when "speed to market" is the most critical aspect. If you have a very limited time frame and no other requirements push you towards Java then another language may be more appropriate.  That is also true if your business domain is potentially in a scientific area where there are fewer 3rd party libraries available compared to a language such as Python. 

And if you have requirements which cross a number of these items resulting in no "perfect for this use" selection then you have hard decisions to make. 

This post could go on for many more examples and languages but hopefully provides a useful analysis for some of the challenges involved.

Wishing you the best!
Scott

Sunday, March 5, 2023

What is difficult?

 It is days like today where the meaning of difficult changes.  Before today, difficult meant dealing with things like a couple of spots of skin cancer on a nose and recovery after surgery.  It also meant dealing with the frustration of finding a good job in the IT field again. And then there are other aches and pains to deal with.

Today it changed a bit. 

Our daughter decided she wanted to join the Marines just before last Christmas (2022).  We sent her off on Dec. 19th, 2022 and in about 2 weeks she ended up with injuries of unknown severity.  Initially she was told it was just a stress fracture in one foot.  Over the weeks, she was in more pain and swelling so finally they did an MRI. It now appears that it is more severe than a stress fracture and both tibia's might also be affected. She went from simply being on crutches to a boot and a wheelchair.  With only 5 minutes a week of phone time, it is difficult to get the full picture of what is going on.

So 'difficult' is having your child in pain, away from home and no one knowing what her medical outcome is going to be. 

The best we can do is pray and ask for prayers from others.

God is always in control..  need to remember this more than daily.

I wish everyone a blessed day.

Scott

Monday, February 6, 2023

Prime number definition using geometry?

I've not seen a definition of "prime numbers" based on geometry and I wonder if there is one. It seems plausible that a definition is possible by using polygons or at least vertices/points and connections between them with some constraints. 

Maybe something like;  

For a set of [N > 2] points forming a polygon; N is prime if you cannot add internal non-overlapping edges resulting in all polygons with an equal number of vertices.

Of course, this doesn't cover 2 so it wouldn't be a general solution and may fail in other cases - I haven't put a lot of thought into it.

Friday, January 20, 2023

Skin cancer - don't delay

The COVID pandemic was difficult in many ways for many people. One of the aspects for myself was that I delayed some medical things which I now know was a mistake. If you are uncomfortable with pictures of medical wounds then skip those at the end of this.

Normal I wouldn't say much about medical items in a blog entry since it makes me very self-conscious. I'm making an exception for this since it could help others to decide to get checkups and prevent them from going through the same issues.

Late last year I decided to start getting some checkups and one of those was for skin cancer.  This wasn't my first checkup but it had been sometime since the previous one.  At that November checkup, I ended up getting multiple biopsies done.  One of those biopsies came back as basal cell carcinoma on my nose.  The good news is this is much easier cancer to treat than some others. 

I was quickly scheduled for a Mohs surgery in early December. That surgery involves repeatedly removing skin layers and testing for cancer.  So you go into the surgical office and they numb up the area and remove a layer.  You then sit in a waiting room while they test it.  If it comes back cancer free then you are done.  If the sample still contained cancer then you immediately repeat that process.  I'm under the impression that 1-3 surgical rounds are normal. It took 3 rounds to get all my cancer. Once done, they use some sort of laser to cauterize the area to stop any bleeding.

The numbing method involved injecting lidocaine at a number of spots surrounding the target area for the surgery. This was a little uncomfortable but not even close to passing kidney stones.  With this numbing method, this is an outpatient surgery and you remain awake during it.  I think I was at the surgical office for about 4 hours.

The cauterization was a bit difficult for me.  Another patient had mentioned it in the waiting room beforehand so I was a bit prepared. The nose area is very sensitive, bleeds easily and my blood had been thinned a bit for other stuff. It took them some time to get the bleeding under control.

I was pretty worn out by the end up surgery but needed cosmetic surgery to cover the hole.  I went back to the surgeon the next day and she ended up doing a skin graft. She took skin from slightly above the area and shifted it down over the wound.

It has been about 6 weeks since the graft. Every week or 2 I go back in to get the area looked at.  It seems to be healing well but the resulting scab is still there.  I'm supposed to keep Vaseline and a bandage on it most of the time. As of the last follow-up appointment, I'm supposed to soak/wet the area with a rag or gauze for 20 minutes a day. Hoping that it will come off cleanly before the next 2-week appointment.

Here I am after the initial surgery but before the skin graft. It felt like I could store a couple dimes in the wound.


The below picture is immediately after the graft was done.


This picture represents most of the 6 weeks after the stitches were removed and the initial swelling went down. 

I'm supposed to put Vaseline on the area and keep it bandaged. Our "medical kit" was original put together when our kids were young.  Our kids are adults now.  I was desperate for a bandage this day before going to a followup appointment.  I got a few looks, smiles and maybe a few laughs at the surgeons office.

Before going in for surgery, some friends from up north gave me some ideas for my resulting "nose job". I touched up a photo to represent one of my friends ideas for me.  The "blue nose" is from some fish picture.  

I hope your day is blessed and your family is healthy!
Scott

Friday, January 13, 2023

From Gnome to KDE

 I've been using Ubuntu for some time along with Gnome. It had been working pretty well until I started to experiment a bit more with GPU related technologies and a few other items.  At some point, my system ended up with an issue where the systems settings app (as example) would sort of "strobe" for lack of a better description.  I didn't find a good way to fix it and after quite a few months I decided to try KDE instead.  

I like KDE. The process of manually converting to KDE wasn't super easy though. I've slowly fixed various issues. One issue was simply that wallpaper settings were lost when the screen saver or other power saving features kicked in.  I did a cleanup of installed software packages and found a few new packages to add - and suddenly it seems to work now (for now).  I do have 2 graphics cards and 3 monitors so I  think that complicated things a bit. I also try to keep up with more recent Linux kernels - stuck on a 6.1 rc version right now.

I also have FreeBSD installed and am trying to get that working adequately.  If I get that working smoother then I may switch over to it.  The software available via package management may not be quite as recent as on Linux but it may be more stable.

As another alternative, I'm working with the "nix" package management on Linux now as well.  It could be a good alternative to other options.  I'm not overly fond of snap packages and similar - has been a bit limiting in customization and a few other areas. Maybe there are workarounds but if nix fixes my complaints without added complexity then it seems like a good idea. 

Wishing everyone a blessed day!

Scott 

Friday, November 18, 2022

Daughter - killer of trees (and tires too)

 So my daughter was known as "killer of trees" when she ran into a recently planted peach tree with her dirtbike and knocked it flat over.  Now she is also "killer of tires" after a blowout on I4 between Lakeland and Plant city.  



We were blessed that it wasn't raining and we were not up north in the snow.  The worrisome aspect was that she was on I4 (which is notoriously busy) around 7pm (dark at that point) and in a section with concrete barriers and very little room.  We were very impressed she got the car over safely and didn't bump the barrier.  She was only a few inches from the barrier on the right side though.  Before my dad and I got there to help her - I asked her to get out the right-hand side and see if the tire could be patched, etc - it took her a few minutes to get out but she came back with a "I don't think so Dad.." which is pretty self-evident now. I had thrown in a small "pancake" air compressor which I had pre-filled just in case.  Didn't need to bother. 

She only had few feet on the drivers side front (which is where the tire blew).  My dad parked behind and hugged the side of the road a bit to "convince" drivers to stay to the left a bit.  That helped a bunch.  I had not had the spare tire and jack out of this car before - was wishing I had brought a speed jack.  I just slowly worked the jack up - taking a bit of a rest here and there for my knees and to enjoy the very cool breeze from the tractor trailers speeding by a few feet away.

As I was sitting there getting the car jacked up, I started to wonder how she got out of the car from the passenger side - it seemed like there was no room.  All I could visualize was her climbing out the window onto the concrete barrier (with a drop-off on the other side) - sort of "The Dukes of Hazzard" style. She told me later she had just enough room to squeeze the door open and get out - only because she was at slight angle was that possible.  

It is kind of funny the way some obvious things escape a person at certain moments. When I was getting the jack, etc out of the back of the car, I found a short bright rod/stake which I thought was in with the jack, etc.  It was just cheap plastic and my mind just jumped to guess it was one of the "emergency items" which you could use to either wave cars around you or put out behind a car to make it more "visible".  I wasn't impressed by the cheap plastic though.  The next day though - I went back out and found it again..  As I looked at it in the daylight I was thinking "something is odd"..


I rotated it a bit and when I saw our last name "Case" written on it, I suddenly knew what was odd.  It wasn't an emergency item - it was out of an old kids horse shoe game and this stake simply ended up in with the spare tire, etc.   I got to laughing with my mom and I told her about it and said I was glad I didn't have my daughter out behind the car waving it at traffic.  We got a big laugh out of that thought.



Trying to find replacement tires now - it is an odd size of course.  Seems like only one or maybe two (less common) brands even make tires in the required size.  I had planned on putting run flat tires on as replacements but there are none in that size.  It is hard enough to find someone with a set of those tires from the 2 tire types.  


1 Thessalonians 5:18
King James Version

18 
In every thing give thanks: for this is the will of God in Christ Jesus concerning you.


Sunday, November 13, 2022

Reasons for poor quality Software Systems

I've seen issues with software system quality over the years - it wasn't just one type of organization or domain. Why is this true even with continued innovation and best practices? I would expect to see improvements over time.  There are plenty of tools to help improve software quality.

Great IDE's

  • IntelliJ
  • Eclipse
  • Visual Studio

Language and compiler improvements

  • Java 11-19

Source scanning tools

  • PMD
  • SonarQube
  • FindBugs
  • CheckStyle
  • SpotBugs
  • VeraCode & Twistlock
    • more related to security but IMO there is a relationship between security and quality

Code generation tools

  • Lombok

Additionally, features like Java annotations are leveraged heavily nowadays which simplify configuration and lower overall code quantity/complexity.

I've found two common aspects across a number of organizations which I think are related to the quality issues.  The first aspect is lack of attention to the warnings listed in common IDE's.  I've seen some applications showing over a thousand warnings when I first worked with them.  This crosses implementation languages/run-times as well - Java, Python, JavaScript, NodeJS, etc. Of course, often IDE's only show the first 100 or so warnings so you don't even have a complete list typically.  

The second aspect is the use of technology, such as general annotations and also Lombok, without paying attention to all the details regarding how each related annotation works (for default and non-default settings).   Default behavior isn't always the required behavior. An example of this is:

create a class such as:

@Data

@AllArgsConstructor

@NoArgsConstructor

public class BaseData

{

/**

* Represent identity; lombok generated equals() should

* utilize this to determine result.

*/

@NonNull

private String baseDataId;

}

 

which is fine on its own.  Note that the name-prefix "Base" easily implies that you may create sub-classes though. Let's do that here;


@Data

@RequiredArgsConstructor

public class DerivedData extends BaseData

{

/**

* Represent identity; lombok generated equals() should

* utilize this to determine result.

*/

@NonNull

private String derivedDataId; 

}

No compile error is generated.  Will this work?  It depends - how are you expecting to use this class?  If you expect that the equals() method will account for both the baseDataId and derivedDataId then you will have an unhappy surprise. 

If you pay attention to warnings in your IDE though you will note a warning is generated. 

Generating equals/hashCode implementation but without a call to superclass, even though this class does not extend java.lang.Object. If this is intentional, add '@EqualsAndHashCode(callSuper=false)' to your type.

I've not seen PMD, Sonar, etc complain about this so those tools leave you feeling like "everything is awesome".  

Add some unit tests which exercise the equals() method in the situation where you are using the DerivedData class and have instances with matching derivedDataId values but different values for baseDataId.  You'll probably write the test indicating the instances should be non-equal.  Will you be surprised when the tests you setup indicating instances should be non-equal actually fail?

The reason it fails is that the generated equals() in the DerivedData class doesn't know anything about the members of the BaseData class.  So equals() in the derived class only uses the derivedDataId member. 

If you review the warnings in your IDE, you will find that it implies how to resolve this if it wasn't intentional - add annotation '@EqualsAndHashCode(callSuper=true)'.  But notice I said "it implies" because it directly tells you how to ignore the warning about this default behavior.  So a good question is - how often is the default behavior correct versus the logic always calling superclass equal() / hashCode()?  I suspect that the current default is opposite from what would be a safer default.

And this brings us back to IDE warnings being ignored.  If you ignore / hide those warnings you easily end up missing these types of errors which can show up as "anomalous production issues" at some point.

I think that an aspect of all this is the attempt to (over)simplify everything. So many details are abstracted away that developers won't see implications of all the "defaults" and "configuration by exception", etc that occurs is so many systems.

Thanks for reading..

Scott


Wednesday, November 9, 2022

Application Architecture and Design (and cloud aspects)

 Let's say you work for some organization and there is a need for a new application.  If you are responsible for the architecture / design then 

My initial post was going to end up being a "ancient" IT history book with some extra stuff. I decided that wasn't very helpful - not many people want to read a book in a "blog format".

I'm condensing the content down to the following. 

  • Use standard practices for
    • project management
    • design techniques
  • Understand the reasons/basis for soft/hard requirements - This covers why a requirement exist and why a specific requirement was chosen over other similar prospective requirements.
    • Examples reasons are;
      • development / operational / infrastructure costs
      • time to market /  speed of handling requirement changes
      • maintainability
      • performance / scalability / availability
  • Carefully evaluate technology choices.
    • Consider the risk of using any technology that could become unsupported before the end of the useful life of your application. New "amazing" technologies may only be around for a short period of time before something new replaces it.
  • Make plans to keep 3rd party frameworks, libraries and languages/run-times up-to-date with regard to the most current versions.
    • Consider the risk, for example, of using early versions of SpringBoot such as 2.1 which are not maintained now - if a new security flaw comes up, it may be very hard to fix the issue.

With regard to standard practices, use whatever is appropriate for your organization and the project need. Many organizations are trying follow "Agile" practices but that doesn't mean that "Waterfall" is always bad to use. Use what is appropriate for the situation.

Understanding the reasons used for requirement selection helps to keep requirements aligned with each other and provides useful context for handling business changes over time.

Technology comes and goes.  Don't love or hate particular technology - it is a tool.  Use appropriate technology and if needs change then consider more appropriate technology.  Don't select technology just because it is considered "great" by any person or group - consider the positive and negative aspects in-depth for your use-case.  

Small example of considerations - given a service expecting high transaction rates; what technology stacks might be considered and what are the trade-offs?

  1. Python
    1. Positives
      1. Increasingly used in enterprises
      2. OpenSource
    2. Negatives
      1. Library ecosystem isn't as mature as for Java
        1. You want a library to help with web requests?  Which option do you pick? What version of Python are you on?
          1. https://pypi.org/search/?q=web+requests&page=1
    3. Considerations
      1. Security
        1. https://www.theregister.com/2021/07/28/python_pypi_security/
        2. https://medium.com/ochrona/arbitrary-code-execution-during-python-package-installation-3a60990350ef
        3. https://snyk.io/blog/python-security-best-practices-cheat-sheet/
      2. Some libraries need local compilation
      3. Cross-version compatibility
      4. Transitive dependency handling
      5. Long term maintenance questions
        1. https://medium.com/codex/python-4-0-will-never-arrive-3d994dce54f1
      6. Runtime aspects
        1. Python global lock
          1. https://wiki.python.org/moin/GlobalInterpreterLock
        2. Memory management - also consider context including containers
          1. https://www.askpython.com/python/examples/memory-management-in-python
        3. Threading
          1. https://docs.python.org/3/library/threading.html
  2. Java
    1. Positives
      1. Heavily used in enterprises
      2. Generally has useful features and reasonably performance
      3. Many enterprise level libraries and frameworks
    2. Negatives
      1. New version every 6 months by Oracle can cause some thrashing of work
      2. OpenSource vs Oracle licensing
    3. Considerations
      1. Alternative JDK / JVM / run-times
        1. Oracle JRE
        2. OpenJDK
        3. Azul
        4. IBM OpenJ9
        5. Eclipse Temurin
        6. Amazon Corretto
      2. SpringBoot vs JEE
      3. Cross-version compatibility
      4. Transitive dependency handling
I highly recommend reading about and understanding the runtime aspects of Python. Consider the effects of memory pressure within and across container instances (i.e. Docker, Kubernetes, etc) - especially in a cloud environment and / or where you are cost / latency sensitive. 

Regarding compatibility and transitive dependency handling - I've had people with architect and team lead titles make comments to me along the lines of:
  • "Java versions are backward compatible so keeping up with current versions isn't important."
  • "We are pinning the SpringBoot version at version 2.3 instead of upgrading to 2.7+ because it improves stability by preventing changes."
I believe these statements reflect some general misunderstandings or lack of knowledge. There are very instances of 100% cross-version compatibility for operating systems or programming languages over significant spans of time. You also have to clarify whether you are talking about things like source code / binary compatibility and forward / backward version compatibility. Try running a bunch of games written for Windows 95 on Windows 11 - how many will work?  In my opinion - likely few.  For operating systems, computer languages and frameworks - features are added and deprecated / removed across releases.  API's change due to needs such as performance, security, new features, etc. If OpenSource is brought up as a solution to these type of issues - I'll claim it isn't reasonable.  There are support matrices for most major OSs, computer languages and library / frameworks - they don't maintain old versions forever. If you are outside a support matrix - you have no guarantee that anything will work and getting help will likely be somewhere between hard and impossible. Needing help for a major security issue or something that breaks a critical system is not the time you want to find out that no one can help you or can't help you quickly. Some common support / compatibility matrices below..

  • OpenJDK support matrix from RedHat
    • https://access.redhat.com/articles/1299013
  • SpringBoot support matrix
    • https://spring.io/projects/spring-boot#support
  • SpringBoot / SpringCloud compatibility matrix
    • https://spring.io/projects/spring-cloud#overview
  • Django support matrix / roadmap
    • https://www.djangoproject.com/download/
  • Nx / NodeJS / TypeScript compatibility matrix
    • https://nx.dev/packages/workspace/documents/nx-nodejs-typescript-version-matrix

Thanks,

Scott

Monday, October 31, 2022

Working and living around Tampa - the challenges

It has been over six years since we moved from up north down to the Tampa area.  We lived in an apartment for a while when we first moved down here - the biggest reason for that was the time it afforded us to research and find the best place to buy a home.  

I did a lot of research before picking the Tampa area as the place we should move to.  In many ways that research was correct.  There are many nice things to do around Tampa, there are many IT jobs, etc.  When we were choosing a house though, I wanted to keep options open a bit though.  I didn't know people who worked at any of the local IT employers so I wanted to be located somewhere central in case a future employment change was needed.  This was very sound reasoning and in the end was useful to a degree.

The first place I worked at down here was located in Temple Terrace.  From our house, it was typically a 35-50 minute drive which wasn't too bad.  There were occasional days where it was over 1.5 hours when accidents occurred at the wrong place/time.  Overall this was fine - until that employer announced pending layoffs and everyone had 3 basic choices - quit on your own terms, stay and see if you ended up laid off, select to take a termination package which required you to stay for some amount of time before you could get their "layoff benefits" package.  Since I had only been there for a couple years, the "layoff benefits" package wasn't very enticing. If you ended up having to stay until one of a set of predetermined dates - you end up looking for work with a flood of other people at the same time. In the end, it seemed like the best move was to quit on my own terms and find a new job before a large mass of other people were also looking for work.

I didn't have a lot of time to find something else but I did my best.  I found a place which was starting some similar cloud work and had some other interesting aspects.  When I interviewed there (about 10am), the drive was only about 1 hour which wasn't bad.  I was a bit nervous because the distance was quite a bit farther and required taking the interstate which had traffic issues on the news almost daily.  I decided to take this job and nearly immediately found that it was typically 75-90 minutes driving there and usually at least 90 minutes coming home.  My GPS would try to route me around traffic but that was usually pointless - I often ended up on streets with stop signs every few feet or the route was just erratic.   I continued with this for around 8 months and was very tired of the drive.  It was hard to be home at a reasonable time to have a family dinner together.  It would have been better if they allowed some remote work but that was never an option.

I was contacted by someone from another company at around the 7 month mark and we started talking.  They were looking for someone which had  had prior development lead experience and lots of general development experience, etc overall. I would have some architecture, dev lead, mentoring, etc work which was pretty much the description of a "dream job" for me.  The routes to this company followed the same initial path as my current company at that time but the new company was closer - not far from the airport. I figured this would reduce drive time by 15-30 minutes one way.  So given the "dream job" option and less driving - it seemed like a good choice to make.

So I made that change.  It was a little less driving but it was still daily stop and go traffic with motorcycles driving between lanes and other just bizarre behavior.  It was usually between 50 and 75 minutes to work and 60-75 minutes home. Nearing the 2 year mark here and then COVID hit.  We had just moved many people, including myself, into a new building next door - all setup with the open floor plan and everyone sits together at groups of long desks.  A bunch of different things just made it feel like it was time to leave there.  The original "dream job" description didn't include all the red tape that affected everyone living in my household due to the nature of the business.  At this point, I really am worn out from the daily drives and traffic, etc.  I realize at this point that it is hard to find something "close" to where I live which is under an hour drive. 

I reach out to agencies and look for remote work.  Jobs which require coming into the office on a limited basis would be great.  I do enjoy the direct contact with others.  I also decide to go with contract or contract to hire positions for the first time ever.  If something changes for the worst, it seemed like it would simplify changing jobs.  

I find a job with a large well known company and it is contract to hire.  It is fully remote at that point but it was indicated that it could change a little.  If I had to go into the office it would be 1.5 to 2.5 hours one way but if that was only once a month or so then that is doable.  There were no real decisions on the details or plans at that point.  I decided to give that a go.  It was going ok but I wasn't doing any real design/architecture work and was pretty bored.  Then one day, it was announced that there would be a 3 day in-office requirement starting in 2 weeks.  That was obviously not going to work well for me and the 2 week notice for it was beyond strange.  Fortunately, my local manager had already requested an exception for a month for that in-office requirement for me.  That ended up extended for another month since they really liked what I was doing.  I knew that at some point that would have to end - if for nothing else, it isn't fair to other employees who have to go in.  At some point, it would cause some friction with other employees if I was left exempted from that requirement.  

Anyways, I finally reached an end-date there and now it is time to find something again which I would love to be a long term employer which doesn't require large numbers of hours on the road each month.

So my recommendation to anyone thinking about moving to a new area like Tampa - think carefully about where the jobs are versus where you want to live.  Don't underestimate the effects of drive time and traffic.  Also remember to account for other things though like floods, hurricanes, sink holes , etc too though..  In the end, it may cause you to rethink how you define "best location" to live.


Wishing everyone in similar circumstances the best!

Scott

Tuesday, October 11, 2022

Hurricane Ian and my parents home

 My parents have been in a nice retirement community for a few years now and this isn't the first hurricane but it is the only one that did significant damage to their home.  Total loss..  

Both my parents and my family are blessed though - no one was hurt and God takes care of the needs. 

I'm very happy we have enough space for them to move in and store many of their belongings while they work through the insurance and wait for a new home.  It is estimated as a good number of months before it will be ready.  It is hard to say if there will be other delays - there are so many people needing replacements now.

It was much different seeing their pictures compared to us being their when I took these. These are after a couple weeks so the roads were clear of debris and the water had receded from the roads we use to get there.


These are from a golf cart on our way to their house in the community.



The devastation was hard to comprehend at this scale.  Tornadoes tear up homes but that is usually in a path you can follow and it may skip areas a bit.  This was just destruction everywhere.  Not every home was a total loss but many were and most others had damage to some extent. 




This is what we found when we got to my parents home.



These next 2 pictures are of what used to be part of the lanai. Roof and most walls gone.  A refrigerator was tossed out in the yard. 


Something like 2/3 of the roof was gone - it was now "brighter inside" but mosquitoes were starting to multiply and lack of electric or any chance of usable air conditioning makes cleanup even harder. I can't say that the smell of wet insulation improves with time. There was some humor though as a few containers in awkward places were full of water - my wife can attest to that!  I was fortunate to not drop the container of fishing weights and water - but I did tell my parents that it made up for them helping me move many heavy books between homes over the years! I probably am off a bit on that - I'm sure they still moved more books than I moved wet fishing stuff.



It is in God's hands and nothing else matters.

Romans 15:13

13 May the God of hope fill you with all joy and peace as you trust in him, so that you may overflow with hope by the power of the Holy Spirit.

  Jeremiah 10:12-13

12 But God made the earth by his power; he founded the world by his wisdom and stretched out the heavens by his understanding.
13 When he thunders, the waters in the heavens roar; he makes clouds rise from the ends of the earth. He sends lightning with the rain and brings out the wind from his storehouses.

Psalms 71:18

18 Even when I am old and gray, do not forsake me, my God, till I declare your power to the next generation, your mighty acts to all who are to come.