nosql if you want durable data or redis for transient should be sufficient.
static data load from csv into nosql or redis.
a database is overkill.
Newbie, junior, senior programmer, Simple POS system
Newbie, junior, senior programmer, Simple POS system
|
![]() |
![]() ![]() ![]()
Junior Member
124 posts Joined: Mar 2008 ![]() ![]() |
nosql if you want durable data or redis for transient should be sufficient. static data load from csv into nosql or redis. a database is overkill. WongGei liked this post
|
|
|
|
![]()
Show posts by this member only | IPv6 | Post
#62
|
![]() ![]() ![]() ![]() ![]() ![]() ![]()
Senior Member
1,203 posts Joined: Dec 2007 From: Kuala Lumpur ![]() |
QUOTE(WongGei @ Mar 6 2023, 11:06 AM) 1.) Manual update menu.csv file are error prompt.2.) Might not cover all cases 3.) Not enough testing has been performed. 4.) The combination will grow ex potentially when the bulk number increase and/or the electable items increase. S1.) Problem 1 and 2 can still be solved by using 2 independent editor and compare their result. S2.) Problem 2 and 3 can ask ChatGPT to help generate the necessary test case or at least we now there are 21 combinations in advance. S3.) Problem 4 can ask CharGPT to display all the possible combination , copy and paste the result into menu.csv. Or write a program to generates the possible combination to update the mene.csv accordingly. From S2 and S3, we can foresee that using AI assisted program will be the future trend. A lot of minor and repetitive jobs that can be done by more human are totally replaced by AI. More and more university graduates will find them even harder to look for new jobs cause they have been replaced by AI Interestingly, I asked ChatGPT to showcase me all the possible combinations and it can't get me a satisfied answer yet. So, I wrote a program to generates all the possible combination to make 5 draws of the A,B,C characters. A,A,A,A,A A,A,A,A,B A,A,A,A,C A,A,A,B,B A,A,A,B,C A,A,A,C,C A,A,B,B,B A,A,B,B,C A,A,B,C,C A,A,C,C,C A,B,B,B,B A,B,B,B,C A,B,B,C,C A,B,C,C,C A,C,C,C,C B,B,B,B,B B,B,B,B,C B,B,B,C,C B,B,C,C,C B,C,C,C,C C,C,C,C,C I used about 2 hours to write and debug the program and charGPT use just few seconds to know that there should be 21 lines. Even though it is unable to provides a satisfied answer, Im sure it will eventually after another few rounds of training. ![]() |
|
![]()
Show posts by this member only | IPv6 | Post
#63
|
![]() ![]() ![]()
Validating
90 posts Joined: Jan 2023 ![]() |
QUOTE(WongGei @ Mar 7 2023, 10:45 AM) So, I wrote a program to generates all the possible combination to make 5 draws of the A,B,C characters. This is interesting, as I haven't thought of how to generate 3 possible combination in 5 characters.A,A,A,A,A A,A,A,A,B A,A,A,A,C A,A,A,B,B A,A,A,B,C A,A,A,C,C A,A,B,B,B A,A,B,B,C A,A,B,C,C A,A,C,C,C A,B,B,B,B A,B,B,B,C A,B,B,C,C A,B,C,C,C A,C,C,C,C B,B,B,B,B B,B,B,B,C B,B,B,C,C B,B,C,C,C B,C,C,C,C C,C,C,C,C I used about 2 hours to write and debug the program and charGPT use just few seconds to know that there should be 21 lines. As a bonus, you can also post the code for this generator. ![]() |
|
![]()
Show posts by this member only | IPv6 | Post
#64
|
![]() ![]() ![]() ![]() ![]() ![]() ![]()
Senior Member
1,203 posts Joined: Dec 2007 From: Kuala Lumpur ![]() |
QUOTE(FlierMate4 @ Mar 7 2023, 01:34 PM) This is interesting, as I haven't thought of how to generate 3 possible combination in 5 characters. Here you go, As a bonus, you can also post the code for this generator. ![]() https://github.com/wonggei/combination/blob/main/combi.cpp Not sure why unable to attach my cpp file. Must be some antivirus problem. |
|
![]()
Show posts by this member only | IPv6 | Post
#65
|
![]() ![]() ![]()
Validating
90 posts Joined: Jan 2023 ![]() |
QUOTE(WongGei @ Mar 7 2023, 03:31 PM) Here you go, Thanks, I haven't ran it, from what I see, you use recursion, wow nice.https://github.com/wonggei/combination/blob/main/combi.cpp Not sure why unable to attach my cpp file. Must be some antivirus problem. As a side note, you don't have other code repo hosted on your GitHub, or they are all commercial projects? Sorry you can choose not to answer as this is your privacy. |
|
![]()
Show posts by this member only | IPv6 | Post
#66
|
![]() ![]() ![]() ![]() ![]() ![]() ![]()
Senior Member
1,203 posts Joined: Dec 2007 From: Kuala Lumpur ![]() |
QUOTE(FlierMate4 @ Mar 7 2023, 04:10 PM) Thanks, I haven't ran it, from what I see, you use recursion, wow nice. Other projects are private.As a side note, you don't have other code repo hosted on your GitHub, or they are all commercial projects? Sorry you can choose not to answer as this is your privacy. |
|
![]()
Show posts by this member only | IPv6 | Post
#67
|
![]() ![]() ![]() ![]() ![]() ![]() ![]()
Senior Member
1,014 posts Joined: Jul 2012 ![]() |
As a senior developer, I'd just code based on the current requirements. 😌
|
|
![]()
Show posts by this member only | IPv6 | Post
#68
|
![]() ![]() ![]() ![]() ![]() ![]() ![]()
Senior Member
1,203 posts Joined: Dec 2007 From: Kuala Lumpur ![]() |
|
|
|
|
![]() |
![]() ![]()
Elite
4,577 posts Joined: Jan 2003 ![]() ![]() |
QUOTE(WongGei @ Mar 7 2023, 10:45 AM) 1.) Manual update menu.csv file are error prompt. If the same price product is inter-changeable, then which product it is doesn't matter at all. Quite pointless to generate the whole combination. 2.) Might not cover all cases 3.) Not enough testing has been performed. 4.) The combination will grow ex potentially when the bulk number increase and/or the electable items increase. S1.) Problem 1 and 2 can still be solved by using 2 independent editor and compare their result. S2.) Problem 2 and 3 can ask ChatGPT to help generate the necessary test case or at least we now there are 21 combinations in advance. S3.) Problem 4 can ask CharGPT to display all the possible combination , copy and paste the result into menu.csv. Or write a program to generates the possible combination to update the mene.csv accordingly. From S2 and S3, we can foresee that using AI assisted program will be the future trend. A lot of minor and repetitive jobs that can be done by more human are totally replaced by AI. More and more university graduates will find them even harder to look for new jobs cause they have been replaced by AI Interestingly, I asked ChatGPT to showcase me all the possible combinations and it can't get me a satisfied answer yet. So, I wrote a program to generates all the possible combination to make 5 draws of the A,B,C characters. A,A,A,A,A A,A,A,A,B A,A,A,A,C A,A,A,B,B A,A,A,B,C A,A,A,C,C A,A,B,B,B A,A,B,B,C A,A,B,C,C A,A,C,C,C A,B,B,B,B A,B,B,B,C A,B,B,C,C A,B,C,C,C A,C,C,C,C B,B,B,B,B B,B,B,B,C B,B,B,C,C B,B,C,C,C B,C,C,C,C C,C,C,C,C I used about 2 hours to write and debug the program and charGPT use just few seconds to know that there should be 21 lines. Even though it is unable to provides a satisfied answer, Im sure it will eventually after another few rounds of training. ![]() Using a single CSV also severely limits what you can do, as you're stuck with a single 2D data structure. You could use multiple csv files like products.csv promotion.csv then you start to realise you're building a mini Relational database ![]() WongGei liked this post
|
|
![]() |
![]() ![]() ![]() ![]()
Junior Member
389 posts Joined: Jan 2003 ![]() ![]() |
QUOTE(silverhawk @ Mar 9 2023, 02:52 AM) If the same price product is inter-changeable, then which product it is doesn't matter at all. Quite pointless to generate the whole combination. When it reach that point, easier to migrate the csvs to a file-based database like SQLite. No need something overkill like PostgreSQL/MySQL yet.Using a single CSV also severely limits what you can do, as you're stuck with a single 2D data structure. You could use multiple csv files like products.csv promotion.csv then you start to realise you're building a mini Relational database ![]() Then later got requirements to keep track of sales, analysis of best selling promos, etc. etc. (imagination starting to run wild ![]() And before we know it, we have an open source POS system born from a single post in Lowyat forum ![]() |
|
![]() |
![]() ![]() ![]()
Junior Member
195 posts Joined: Aug 2021 ![]() ![]() |
QUOTE(junyian @ Mar 9 2023, 08:25 AM) When it reach that point, easier to migrate the csvs to a file-based database like SQLite. No need something overkill like PostgreSQL/MySQL yet. A complete workable system (or people are willing to use)Then later got requirements to keep track of sales, analysis of best selling promos, etc. etc. (imagination starting to run wild ![]() And before we know it, we have an open source POS system born from a single post in Lowyat forum ![]() Should help the real user to solve real life issues. E.g. Order will send to kitchen printer. Cash / E-Wallet / Card receive payment. Daily reports. ![]() |
|
![]() |
![]() ![]()
Elite
4,577 posts Joined: Jan 2003 ![]() ![]() |
QUOTE(junyian @ Mar 9 2023, 08:25 AM) When it reach that point, easier to migrate the csvs to a file-based database like SQLite. No need something overkill like PostgreSQL/MySQL yet. Should just sqlite from the start, really no reason to be using a CSV file as the data source Then later got requirements to keep track of sales, analysis of best selling promos, etc. etc. (imagination starting to run wild ![]() And before we know it, we have an open source POS system born from a single post in Lowyat forum ![]() Even full blown POS don't need to use Postregre or MySQL. If you want to do cloud syncing and stuff, its actually better to use RqLite which gives you distributed sqlite. |
|
![]()
Show posts by this member only | IPv6 | Post
#73
|
![]() ![]() ![]() ![]() ![]() ![]() ![]()
Senior Member
1,203 posts Joined: Dec 2007 From: Kuala Lumpur ![]() |
CSV, NoSQL or SQL server, its just a way to store data. The problem I wanted to highlight is how to generates that set of data and how to make sure that set of data is the correct set of data. Without the data, that's nothing to store ....
This post has been edited by WongGei: Mar 11 2023, 01:17 PM |
|
![]()
Show posts by this member only | IPv6 | Post
#74
|
![]() ![]() ![]() ![]() ![]() ![]() ![]()
Senior Member
1,203 posts Joined: Dec 2007 From: Kuala Lumpur ![]() |
QUOTE(silverhawk @ Mar 9 2023, 02:52 AM) If the same price product is inter-changeable, then which product it is doesn't matter at all. Quite pointless to generate the whole combination. Its a very good point. Lets see how easy to implement this and what limitation will it impose on the original program. Its really not that hard. https://github.com/wonggei/priceoptimizatio...main/senior.cpp |
|
|
|
![]() |
![]() ![]() ![]()
Junior Member
195 posts Joined: Aug 2021 ![]() ![]() |
Just notice this line...
QUOTE(WongGei @ Mar 4 2023, 04:37 PM) A senior programmer might not be a good programmer and a junior programmer might not be a bad programmer. Most people may believe senior professional should be good at their work, their skills set, and should learn from them. ![]() Should we think "a bad programmer does not deserve to be a senior programmer" ? ![]() Or should we called such people "a senior but bad programmer" ? Is this an insult of their work (not skill) ? ![]() |
|
![]()
Show posts by this member only | IPv6 | Post
#76
|
![]() ![]()
Elite
4,577 posts Joined: Jan 2003 ![]() ![]() |
QUOTE(flashang @ Mar 16 2023, 10:58 PM) Just notice this line... The problem is the term junior/senior. Its a word which is based on temporal experience rather than tangible experience. So if someone worked for 10 years and didn't do much, they're still considered "senior" even though got those who worked 2 years but experienced a lot more. Most people may believe senior professional should be good at their work, their skills set, and should learn from them. ![]() Should we think "a bad programmer does not deserve to be a senior programmer" ? ![]() Or should we called such people "a senior but bad programmer" ? Is this an insult of their work (not skill) ? ![]() Too bad we don't really have ways to quantify actual skill/experience. So seniority has to stand in as a lousy estimate. flashang liked this post
|
|
![]() |
![]() ![]() ![]() ![]() ![]()
Junior Member
576 posts Joined: Jul 2006 ![]() |
QUOTE(silverhawk @ Mar 17 2023, 10:15 AM) The problem is the term junior/senior. Its a word which is based on temporal experience rather than tangible experience. So if someone worked for 10 years and didn't do much, they're still considered "senior" even though got those who worked 2 years but experienced a lot more. Dunno about you guys, but I'm still junior, at least according to LYN's description of my profile (look to the left). Need to up the post counts before I'm not junior. Damn it's hard. Been trying years.Too bad we don't really have ways to quantify actual skill/experience. So seniority has to stand in as a lousy estimate. This post has been edited by angch: Mar 17 2023, 11:17 AM silverhawk and flashang liked this post
|
|
![]() |
![]() ![]()
Elite
4,577 posts Joined: Jan 2003 ![]() ![]() |
|
|
![]()
Show posts by this member only | IPv6 | Post
#79
|
![]() ![]() ![]()
Junior Member
146 posts Joined: Nov 2021 ![]() |
I think there is one missing level, Mid-Level (between junior and senior).
Actually, the term junior depends also on the company you work for. Someone who is a senior in a small local company can be just a junior in a MNC company. Try to apply for a junior position at Microsoft. I bet it will be crazy challenging for many of us. Haha.. |
|
![]()
Show posts by this member only | IPv6 | Post
#80
|
![]() ![]() ![]()
Junior Member
146 posts Joined: Nov 2021 ![]() |
![]() This will be my initial database design for this Cafe POS system. Next will be the UI / UX mockup design. But UI / UX is not my strength ![]() After that only I will approach the system owner to finalize the requirements before starting the development (coding). Tullamarine liked this post
|
Change to: | ![]() ![]() ![]() ![]() Time is now: 25th March 2023 - 06:38 PM |