+1 for snipeit it’s an amazing tool but it has 1 huge asterisk. GARBAGE IN GARBAGE OUT, if you are not 100% diligent on ensuring all your input data is accurate and matches up things will get ugly fast.
Are agents needed, or would they be allowed to run?
To get the demo version of the OpenFoodFacts code working – after a bit of effort to figure out why the manifest was causing an error – and am now using a very simple Java application configuration, designed to just run the demo class – which is ‘Application.java’.
I had to add facets to the code ( or make it a Maven project) and eventually it was runnable. Too rusty on Java stuff that was not well understood in the first instance, I suspect.
Added it as a project (008) and Run – Java Application now runs from within Eclipse.
Still using 006b as the project to learn from. Continuing from p51 in SPIA v5.
A number that passes the Credit card Luhn Check is: 123456789007
Got as far as page 66 – and note that:
H2 console available at ‘/h2-console’. Database available at ‘jdbc:h2:mem:tacocloud’
This was reasonably well defined and scoped effort. Continuing though the book to make progress and learn a little bit along the way.
Thankfully, the code is compiling at the moment, and small changes to the class names still seem to work – so the link between the template and the object needs to be better understood by me. Note that Ingredients, ProcessTaco and other things seem to be renamed in the new code – for better, I guess.
Note that I put the jar into the eclipse Application – Contents – as follows – to ensure that it can be found. Need to remember this if eclipse gets re-installed.
A little bit too much time trying to get Lombok to work. Then discovered that 2.0.4-release and 2.4.0 had wildly different results.
Decided to take the code from the next version of the book, and things soon seemed clearer.
Need to write up the individual elements, as they will be forgotten too quickly – vm arguments to get Lombok installed !
Anyway – got to page 35 – and have started the project again from scratch in a way. Need to check out the version of the Spring initializr that is being used as the version of java that is installed on the mac – and figure out how to setup the mac appropriately.
Create a simple household inventory of what is in the fridge/pantry at the moment
Determine from the receipts – what the prices are – where purchased – and perhaps check later if there was a better place to purchase and what the savings might have been.
This was unproductive, so we may end up sacrificing some of the productivity of STS from the practical element that we have Eclipse working at the moment.
Two things: a) Open terminal and run ./mvnw clean package – to run the tests
b) Open terminal and run ./mvnw spring-boot:run – in order to deploy it to tomcat as envisaged.
It should be possible to set this up within Eclipse – however I don’t think that I am at the optimisation stage yet – still at the learning phase and want to get to a point where we string some basic elements.
Code is under 005/ch01/tacos
Finished up on page 26 of the book, and will end up reading 1.4 tomorrow.
Revisting this: * Narrowing the scope initially to put data in and out – may be to have the electricity bill tracking project up and running. It might be a better defined UI to get something working.
Start on the Spring in Action book to pull a web-site together (got to page 17 in background reading)
Create a simple flow – scan the barcode – check if in database already – pull the information from the API
Create a simple household inventory of what is in the fridge/pantry at the moment
Determine from the receipts – what the prices are – where purchased – and perhaps check later if there was a better place to purchase and what the savings might have been.
Implemented the accessing-data-rest as the 3rd project in GitHub. Because I downloaded the files, but did not save, and was running the commands from the tutorial on the command line rather than from the IDE (Eclipse), it took time to notice that there was a problem.
The URL returned ‘profile’ rather than ‘people’ and this continued even after setting up the correct code – so need to investigate that later.
Need to use GitHub desktop to check in the code – so need to look at that as well.
For day 4 – MySQL is needed, which needs an Oracle account – so resetting the password on that at the moment, and it is not an instantaneous response to the ‘forgot password’ prompt..so it may be tomorrow before it gets downloaded. Noticed that https://www.baeldung.com/spring-data-rest-intro has good tutorials on this topic as well.
Disappointing progress, but need to spend the requisite hour on this to make it possible.
Try to outline a simple path for things to do in the future.
So, what happened?
The development environment is setup at little bit at the moment. For the GitHub – there is a new repository – ‘scanner_2021’ That is setup remotely at the moment.
Locally on my development environment, we now have Eclipse as an IDE, and the GitHub Desktop downloaded as well. The demo code (001) for yesterday and the code from today is in a folder named (002).
The idea is to create a folder for each project, (numbered sequentially), and then push that into the repository. They are each independent projects within the repository.
In memory database is simple and seamless to configure
Very simple example – just runs an executable JAR
The links for how to create a WAR – which could be deployed as sadly missing – it started with bringing you to here: https://spring.io/guides/gs/convert-jar-to-war/ however that leads to a starting page on the Maven link. The other two links work…so a rename of a section seems to have happened somewhere along the way.
It would be worth considering creating a few classes for the intended application, and then putting them into the demo applications – so that we can build and extended them over time.
So, I’ve an idea for a small project to be created – scan an image, read the text, populate a database, and then go and have it available via a mobile application.
All of this is a mix of ideas that are out there, and seeing as I’ve not written some code in a while, it will be like dusting off the cobwebs and learning things that I’ve not known before.
So – the intention is to just use Java, and some tutorials in Spring to learn how to do some of the basics, and to try to get a simple version of the idea up and running, and to learn a little bit more every day.
Try to outline a simple path for things to do in the future.
Other things on the list:
Setup my AWS account
See what mkyong.com tutorials may be relevant
Figure out what is good on the free tier from AWS that may be useful – e.g. https://aws.amazon.com/dynamodb/ is free for 25Gb, so may be useful in the beginning
Need to see how to send an image to AWS Rekognition and to get the text back
Figure out how to read a barcode in a mobile app – may be an easy framework
Send the barcode to do a lookup on the values
Try to do a simple end to end prototype
What would a prototype (product lookup) look like
Scan a barcode – and look it up in a database
Have details of the product and the size/cost/nutrition etc – similar to myFitnessPal
Scan a receipt
Send to rekognition
Get the product details back
Store and match purchases and track prices over time
Match and track the receipts to credit and debit cards in order to determine if there are issues/fraud occurring.
Do a mini price-watch on it
Overall household spending and finance tracking would be impossible, but worth seeing what could be learned by attempting to build something small as a mini project.
Pull all health data back from existing systems and put into a personalised database.
If you are getting an “Unspecified Error” in Windows 10 when testing out sessionStorage in HTML5 from a local file – the answer may be that sessionStorage in IE only works under http, and notfrom a file on the local filesystem.
It will work in Chrome and Firefox, but not IE.
So – test in a different browser – or host the file on a server and test it again.