Rants and Raves

Welcome to Rants and Raves! I kept hearing that I needed to write, so here is the blog that I ended up starting. It is mostly an accounting of my progression through creating a web site, nuances with code, and tips about what I did to make things work. In there you will find sprinkled about some gems of life, and letting loose fun. Enjoy!

Moving Again, At Least A Bit
2023-03-06
We did end up getting a trailer, just to find out it had a flat tire. Got breakdown to get someone to come fix it, but had a good wait. After they swapped the tire for the spare we drove about 2 hours to finally pick up a load... just for them to be closed. On the bright side we watched more One Piece, I got to play some FFXI, and we binged The Promised Neverland. Plus we were able to ride some more One Wheels and get Nova's blanket washed.
Trailers Everywhere, But No Empties
2023-03-05
Apparently there is a shortage of empty trailers in the Atlanta area, we have run around for hours trying to find one. We contacted the terminal after the last failed location and were told to wait while they contacted someone, and spent the rest of the day waiting. After a little bit of a waiting at that location we realized we were really close to the Atlanta terminal, so we hopped on over. We got some laundry done, went on walks with the animals, rode the One Wheels, and watched some more One Piece. It ended up being a pretty chill day.
DataTables.net Quick And Dirty
2023-03-04
I got DataTables working, but not the Laravel DataTables. In Yajra's introduction it does specify that Laravel DataTables is a package that handles the server-side works of DataTables using Laravel, and provides links to to source. I followed them to datatables.net an started reading through the manual. There are some quick lines of code that you can add to your HTML to get a quick and dirty implementation of DataTables going. The view in question should have the following lines of code added: <script src="https://code.jquery.com/jquery-3.6.3.js"></script> <link rel="stylesheet" href="https://cdn.datatables.net/1.13.3/css/jquery.dataTables.min.css"> <script src="https://cdn.datatables.net/1.13.3/js/jquery.dataTables.min.js"></script> <script>$(document).ready( function () { $('#myTable').DataTable(); });</script> The table in that view should be setup as such: <table id="myTable" class="display"> {{-- the display class was not needed for my table, but might cause issues for other implementations if it's not there --}} <thead> <tr> <th>Heading</th> ... </tr> </thead> <tbody> <tr> <td>Content</td> ... <tr> </tbody> <tfoot> {{-- Footer is optional, but DataTables can still work with them --}} <tr> <th>Heading</th> ... </tr> </tfoot> </table> Note that DataTables says it can work without the <thead> or <tbody> elements, but I had to add those in for it to work. Also note that this implementation of DataTables only works with the data that has been sent to the view, although at a quick blush it works well. It is only client side, and as is cannot request anything new. If you are working with large amounts of data this can be a problem for data transfer and client processing. I did look into the server side implementation and am a little ashamed to admit that I am not so keen to take a whack at it, as it means understanding a few more coding languages better than I current do. Also, from what I have seen DataTables does not have any kind of export option, which Laravel DataTables does. So now I think I am back to upgrading my project. https://yajrabox.com/docs/laravel-datatables/10.0/introduction https://datatables.net/
DataTables Dependency Conflicts
2023-03-03
A bit of a hiccup, DataTables has a dependency conflict with another package that has not been easily resolvable. The issue is that something in the 'composer require yajra/laravel-datatables:^*.*' install won't accept an illuminate/database version above 5.*. I might not need all of the extra packages, which opens up the command 'composer require yajra/laravel-datatables-oracle:"^*.*"'. The potential issue there is that the lower versions of DataTables which are theoretically compatible with my version of Laravel still have dependency conflicts. And the version that was suggested to fix the dependency issues might not actually support my version of Laravel, although it seems to have installed just fine. https://stackoverflow.com/questions/73107925/requirements-could-not-be-resolved-to-an-installable-set-of-packages-yajra-lara composer require yajra/laravel-datatables-oracle:^9.21.2 If this doesn't work, then I'll probably need to look at updating to a/the newer version of Laravel. At that point I might just start a whole new project so that everything is clean and more or less copy the rest of the code over.
Taxes And DataTables
2023-03-02
Took a minute to get started organizing tax documents, and of course we are missing a few things. but the important thing is that it has been started, companies have been contacted, and it's now on the to-do radar. In my opinion taxes are far too complicated. It's not too bad when you're single, worked only one job, and don't really have anything else going on. However, every additional thing multiplies the complexity; married, student anything, house, incentive programs, moving jobs, working out of state, and all kinds of little nuances. What's more is that we are the ones in charge of determining how much we owe, but if we get it wrong there are penalties and possible jail. Yet the one's that know what we owe won't just tell us. It's like a math class gone horribly wrong. Anyway, working on taxes. Also, started looking into providing export capability for the data that is currently in the view. After some solutions that worked mainly off of feeding data from the DB instead of the view I decided to contact my Guru. He pointed me to Laravel DataTables from Yajra Box, which provides an excellent solution for tables in general, including pagination, sorting, filtering, formatting, and several export options. https://yajrabox.com/docs/laravel-datatables/10.0/ I have my focus for the export upgrade now.
Licensed To Massachusetts
2023-03-01
It's official, we are Massachusetts residents. We swung by and picked up our new licenses from the PO. The car had some water get into the engine compartment... and into the battery compartment... and completely drain the battery. Luckily there was a guy there who was willing to jump the car. Once it was started though, ran like a champ. Also got the swing by Sweet Piglet to get some Bobba Tea and sweets. We like their goodies and personality.
More Boats
2023-02-28
Speaking of boats, one of the sailing YouTube channels that I have taking a liking to has been Sailing SV Delos (https://www.youtube.com/@svdelos). They have been documenting their adventures since their first big trip across the Pacific in 2010. They were still pretty new to sailing at that point, just heading down the West coast of the US prior. I like seeing the cool places they find, the people they run into, and the trouble they encounter along the way. They give a decent perspective of what boating is like for them, although they live a different lifestyle then we do. There are still a lot of parallels that make them relatable and they still show what to expect from the oceans.
Boat
2023-02-27
We've been working on getting through One Piece, but there are a lot of episodes. The show follows a small but resilient crew of extraordinary pirates as they seek out adventure, treasure, and the "One piece". It's a show that helps give us the motivation to work toward getting our own boat. Sailing seems like a great adventure and way to break away from everything. It's going to have a lot of challenges that we've yet to really encounter, but from what we've seen not much different from first time home owning. Maybe higher stakes if thing go too wrong, lol.
Laravel Compound/Composite Index/Unique And Other Reminders
2023-02-26
Also in implementing Laravel Socialite I ran across an interesting migration bit, making table column combinations unique: $table->unique(['user_id', 'provider_id']); https://laracasts.com/discuss/channels/requests/complete-register-and-login-app-with-socialite-and-multiple-providers?page=1&replyId=76774 This is supposed to put a constraint that will make sure that there is only one set of the combined column values. You would be allowed to have the same user_id several times in that column, and several of the same provider_id in that column. But the combination of user_id and provider_id will only have one. In the Laravel docs they do mention the compound or composite index, but don't mention that it can be used with the unique() method. Do be sure to wrap the columns inside of the square brackets [] otherwise Laravel will interpret the second argument as a user provide index name. https://laravel.com/docs/10.x/migrations#creating-indexe. Some other reminders, Some code to check the existence of an index key: https://stackoverflow.com/questions/30504939/check-if-a-unique-index-key-exists-in-laravel The Eloquent queries can chain together to make ANDs with ->where()->where() as well as ORs with ->orWhere()->orWhere(). This is not really in the Eloquent section, but rather the Database -> Query Builder section. https://laravel.com/docs/8.x/queries#basic-where-clauses PHP function to upper case the first word of a string: ucfirst($value); https://www.php.net/manual/en/function.ucfirst.php
"Upgrade" PHP Versions In Windows
2023-02-25
When installing Laravel Socialite I did have an issue with my PHP version, I needed 8.1 and had 8.0. Keep in mind that It wasn't Homestead or Forge that had this issue, but rather my PC itself. To "upgrade" PHP versions there are 4 basic steps: 1. Download new PHP. 2. Update the Path Environment Variable. 3. Copy or modify the php.ini file. 4. Restart any open Console windows. Download PHP from the PHP creators, unzip, rename if wanted, and move to desired location: https://www.php.net/downloads.php Search for "environment" until "Edit the system environment variables" shows, click on it, go to "Environment Variables", select "Path" then "Edit", add new PHP folder path. https://helpdeskgeek.com/windows-10/add-windows-path-environment-variable/ If you have made any adjustments to the PHP options in the previous php.ini file, such as uncommenting the "extension=php_openssl.dll" line... You will want to copy over the old php.ini file from your previous PHP version, or modify a new one. https://stackoverflow.com/questions/35249620/the-openssl-extension-is-required-for-ssl-tls-protection And the one more import thing to do to have the changes take effect, restart any open console windows so that they will get the new Path Environment Variable, and know where the new PHP version is.
Id Title Body Post At