Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Any Chefs out there?

 
Saloon Keeper
Posts: 24879
174
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you do lots of cooking, it's likely that you've had or wanted to have an app that would help manage recipes, shopping lists and the like. It's such a universal concept that it was even part of the pre-PC "House of the Future" presentations where you had a PDP minicomputer or something built right into the kitchen!

I don't know what the current commercial options are, but in the open-source world, things are in sad shape. There are several recipe management apps, but all the ones I could find for Fedora Linux are broken or are unsupported.

My own personal favorite was Gourmet Recipe Manager by Thomas Hinkle (https://sourceforge.net/projects/grecipe-manager/)  and alas, it's effectively unusable at this point. The system was written in Python2 which is no longer standard in recent Linux releases. At various times in its history, it has experienced breakage due to changes in its database interface (SQLAlchemy). Graphics interface (Gtk2) and of course, Python itself. None of which were Hinkles' fault or under his control. Regrettably, he doesn't have the time to do anything about it so a fix is not looked for in the near future.

Think of that next time you hear Java disparaged for being an "old, out-of-date" platform. Java and its environment were designed to keep running in a changing world. If no one can be bothered to update something. Java will generally keep running - it doesn't mandate constant updating. That sounds tailor-made for this sort of environment.

I did look at upgrading Hinkle's source for Gtk3, Python3, et. al., but Python is not my main strength and too many secondary systems wanted too many major changes. So instead, I've forked the concept and am in the process of re-inventing it in Enterprise Java. The ultimate goal being a desktop app (Spring Boot) that faithfully reproduces the functions (and as much as possible, the look-and-feel) of the original. Because it operates as a web application, the UI is HTML, and thus both platform-independent and relatively immune to obsolescence.

It's made from standard Java components, including JavaServer Faces for the presentation, Spring JPA for persistence, and runs as a Tomcat webapp (testing under Java 11 and Tomcat 9). I don't intend to make it state-of-the-art Java. Unfortunately, a lot of Java's vaunted stability has been under stress in recent times and the move from Sun/Oracle javax to Jakarta EE isn't making it easier. But again, old java rarely breaks and that's good enough until things settle down.

I'm keeping the development source code at https://gogs.mousetech.com/mtsinc7/GourmetJ You will need an existing GRM database, which is a sqlite3 file. I can supply one on request. It's very early days, so being able to create a database and add/update recipes is yet to be done, but you can at least do basic searching and display on a recipe database.

If anyone's interested, I'd be glad of feedback!
 
Bartender
Posts: 4752
184
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sounds too complicated for me, Tim!

I'm retired, and it dawned to me a couple of months ago that I never cooked for my family (and rightly so, since the misses is an excellent cook and why on earth would I try to take over?), but I started to feel more and more quilty. So she agreed to teach me all of her cooking, and while she is busy, I write everthing down in an empty book, meant to write down your deepest thoughts.  And I write all the details, including whether the fire is low, medium or high. The book is half full at the moment. Yesterday I made a lot of Chili Con Carne, with my book beside me on the counter, doing my best, although experience so far showed me a big lack of talent. And I use my fountain pen! Admitted: not very sophisticated, but a lot of fun!
 
Saloon Keeper
Posts: 13505
305
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'll look it over when I have some time on my hands, Tim.

Piet, the single most important tip I can give you is: Keep tasting the food while you cook it. It's easier to make corrections as you go than afterwards.
 
Tim Holloway
Saloon Keeper
Posts: 24879
174
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Stephan van Hulst wrote:
Piet, the single most important tip I can give you is: Keep tasting the food while you cook it. It's easier to make corrections as you go than afterwards.



I always like my recipes to be happy little surprises!

Piet, it's not that hard to set up and run Tomcat actually. It's available as a ZIP file and just to run it you'd download and unzip Maven and Tomcat, use Maven to build the WAR and deploy it into Tomcat. I did provide instructions on the site page and of course, since this is all standard parts and processes, easy to get support on the Ranch.

Now if you were interested in actually working with the source code, setting up an IDE and so forth, well, that's a bit more complicated, but just user opinions are important to me.

I have recipes hand-written, printed and stored everywhere in every room and general disarray and a lot of time I end up pulling something straight off the Internet. So my most important stuff is located on a central server where I hacked up a simple PHP app that allows me to search and find and display on a tablet. Or print to a little thermal printer so I don't have to waste an entire sheet of letter-sized paper for a short list of ingredients.

The PHP app, as I said, is minimal and read-only. I've already got the Java equivalent doing that and more.
 
Marshal
Posts: 5222
323
IntelliJ IDE Python Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This looks far too useful and meaningful for the Meaningless Drivel forum.
 
Tim Holloway
Saloon Keeper
Posts: 24879
174
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tim Cooke wrote:This looks far too useful and meaningful for the Meaningless Drivel forum.



Piet, it just occurred to me that I should publish my prototype on one of my public servers. That way you could play with it without installing anything. Plus, of course, I can replace the old PHP app I use in-house.

Later today, I think.
 
Piet Souris
Bartender
Posts: 4752
184
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Stephan van Hulst wrote:Piet, the single most important tip I can give you is: Keep tasting the food while you cook it. It's easier to make corrections as you go than afterwards.


That was the first line she made me write in the book!      
 
Piet Souris
Bartender
Posts: 4752
184
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tim Holloway wrote:Piet, it just occurred to me that I should publish my prototype on one of my public servers. That way you could play with it without installing anything. Plus, of course, I can replace the old PHP app I use in-house.

Later today, I think.


I think I miss a lot of knowledge, but I will give it a try! No doubt I shall have many, if not more, questions.
 
Rancher
Posts: 1012
27
Netbeans IDE Oracle MySQL Database Tomcat Server C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've never found a recipe program that has the measures that I learned... a cup is when you cup your hands together, a tablespoon is the thumb place flat in the palm, and teaspoon is a finger place flat in the palm, and a half of each is the tip... a 1/4 teaspoon is the tip of your little finger in your palm, and any smaller is just a pinch--literally.

it works remarkably well, for a small recipe, but triple or more and it really is thrown off.

it doesn't work well for hot liquids either lol ;)
 
Tim Holloway
Saloon Keeper
Posts: 24879
174
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
https://gourmetj.mousetech.com/

If the domain name doesn't resolve, it's still percolating through the Internet DNS system. Should be available world-wide in 24 hours or less. I haven't registered an SSL cert for the domain yet so you'll get a security alert.

If you leave the search input blank and hit "search" you'll get the full list. Note that there are some dead entries in my database so if a recipe shows up blank, it's probably crud that got in who knows how many years ago. Stuff with thumbnails generally has good results, though.

Les, I've never had much luck in hand-based measurements myself, so usually you'll see standard US or Metric measures in my database. The original system has a scaling function, though I've got a lot of other stuff needs doing before I get to that.

And of course, some things just don't scale well. Just finished my green bean casserole and there's no way I can make less than a week's worth at a shot. I make my own cream of mushroom soup.
 
Saloon Keeper
Posts: 1737
63
Eclipse IDE Postgres Database C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Stephan van Hulst wrote:I'll look it over when I have some time on my hands, Tim.

Piet, the single most important tip I can give you is: Keep tasting the food while you cook it. It's easier to make corrections as you go than afterwards.



Agile and iterative development methodologies in the kitchen!

I will randomly note that at least ISKCON if not more traditional Hindus do not believe in tasting food as it is cooking:
https://www.iskcon.org/

I generally got along with them great as a vegetarian in New York (they were surprisingly very understanding of veganism despite it not being a part of the longer-term traditions they come out of) with that one exception.

I had wondered if it was borne out of food scarcity where they wished to ensure that the chef/cook didn't cheat by taking more than their share during preparation or something else.  I never really figured that one out but it was one thing I disagreed with them about.

I'm flamingly vegetarian anyway, and they are generally very open to vegan approaches, so I'd say when I think of them in the kitchen there's that one point I strongly side with Stephan on.

The one twist is to remember that you are cooking for the least common denominator of the people who will be eating it, so you should be tasting it keeping whoever wants the least of (chilies, black pepper, salt, etc.) in mind.

Now back to the spirit of Tim's thread.
 
Tim Holloway
Saloon Keeper
Posts: 24879
174
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have very forgiving victims diners. Admittedly not so much if I get it too hot, but that's kind of hard to un-do so we just live with it. I can usually take care of the excess myself.

Note for the demo website visitors. The context paths on the live server are different than on the test system and it appears to have made some functions unreliable (you'll see a blank page). I'm looking into that.
 
Tim Holloway
Saloon Keeper
Posts: 24879
174
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK. Different URL.

https://gourmetj.mousetech.com/gourmetj

JSF was generating the wrong base URL. I think it's because I used to use mojarra and am using the WildFly implementation here. Which indicates someone wasn't doing something right.

Until I can figure out a more transparent URL form, please use the one above.
 
Tim Holloway
Saloon Keeper
Posts: 24879
174
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just for information. I've just posted some wonderful code to the project.

One of the great things about the original Python project was its ability to accept pasted-in lists of ingredients, digest them, and sort out what was amount, what was unit type, and so forth and post the database accordingly. That includes special fraction characters, incidentally.

I've managed to do a decent replication of that function and it's called from a new recipe detail editing page I've added to the project. It's all still quite rough and you won't see that page off the main menu (you have to call it manually), but it's shaping up nicely.

This is only in source code at the moment. I'll update the memo app when it's a bit more polished.
 
Tim Holloway
Saloon Keeper
Posts: 24879
174
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Likes 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've been very evil this morning.

One of the things I really liked about the original Python Gourmet Recipe Manager was that I could copy a list of ingredients from a web page and paste them into a recipe's ingredient list. This isn't as easy as it sounds, since it has to break things down line by line and figure out what parts of each line are what. And remember, in HTML there are no end-of-line characters!

Well, I've done it, or a reasonable facsimile thereof. It appears that not all web browsers actually support cut-and-paste, so there aren't standard JSF or even Javascript support features for it. but I managed to make it so that if you paste into the "Add Ingredient" control it will sort out multiple ingredients.

It's posted to my source code server. I want to add the "delete" and Move Up/Down to it and then update the online demo.
editRecipe.png
[Thumbnail for editRecipe.png]
 
reply
    Bookmark Topic Watch Topic
  • New Topic