Creating my own Point of Sale system, Part 0: Start

I had several topics I wanted to write about (both from my dabblings in machine learning and travel stories), but a more urgent thing came up. With a change in Czech legislature, all shopkeepers are now required to authorize all transactions at the Ministry of Finances' servers. They call it EET - Elektronicka Evidence Trzeb. (electronic records of sales) Sadly, POS just reminds me of part-of-speech tags. To deal with the ambiguity, I'll just refer to it as EET system, even though it contains more.

So what exactly is EET?

From march on, every time we make a sale, we have to contact their servers and send them the amount with our hashed ID we got from them by registering. Afterwards, they send an unique receipt ID back, which we have to print and give to the customer. The customer can then at any point check the receipt on their website. The specifications are all published and the state doesn't require any license to use it.

It's rather annoying and requires certain investment, but I'm not going to complain about that. I'm still trying to prove people wrong about the Vietnamese stereotypes by example. Even though I might confirm some stereotypes instead. We (as in, mostly my parents) used a simple cash register until now, and kept track of sales using a notebook.

The state promised everyone to give them a 5000 czk (~280 eur) tax refund for the equipment and software. Of course they don't consider ongoing costs such as the internet provider or software license, but hey, better than nothing! The common use case is a android tablet with a bluetooth printer, which could probably squeeze into the 5k. That is of course not very acceptable for a 20m^2 shop. Being a cheap person, I looked for windows apps instead, as I got a spare thinkpad x61 I could use. The software I found either cost around 1500 czk or had a 200 czk monthly fee for support. We have to add 2k for a receipt printer and potentially 1.5k for a barcode scanner and other things.

That is reasonable, but most of the newer solutions did not support a bar code scanner (a must, since my father is really bad at typing prices and a typo on a EET system can turn bad really quick). We didn't have a bar code scanner until now, but it feels shitty to pay money for something that doesn't fit your use case. They were usually very simple calculator-like programs where you typed the price and the tax percentage. One allowed you to predefine items, which I found quite OK, but it still involved a lot of clicking. (That one I'm keeping as backup in case I fail during the next 2 months)

Of course, full-blown system with a touch screen and everything costs 20-30k which we can't afford. We were thus at a crossroads of sorts. We don't really need to buy all that new hardware just to keep track of some newspapers and alcohol, but writing each sale would take way too long.

So I had an incredibly bad idea.

Why not make one myself?

As a disclaimer I'm an average computer science student. There is a distinct difference between computer scientist (which should be people using computers and maths, for science) and software engineers, who actually design software and know all the correct structures and templates. People often see the 2 categories as one. Of course, there are also code artisans, full stack devs and all sorts of bullshit terms, but I never met one of those.

I always felt that being able to program to solve your problem was not the same as doing it correctly. Scalable, secure, with error handling, logging and all that. That's a lot of work we usually skipped while doing sick polynomial complexity graph algorithms.

I usually code in python at work and sometimes make my life easier with bash scripts. My last big project was a semester project in java (multiplayer minesweepers). I have absolutely no experience with software engineering apart from database design (where I teamed up with 2 software engineering students and only did the "difficult" sql querries while they coded the app). My last GUI was written in Swing, which I heard has been discontinued for JavaFX. (it was also hideous) I never ever touched javascript. I never did git truly properly (apart from that one time my mentor gave me 78 code formatting issues, which scarred me for life). I spent a year doing neural networks, NLP and ML.

So yeah, I'm the perfect candidate to write production software.

This is going to be more of an exploratory learning session where I hack together a (probably insecure) system which keeps track of our wares using a barcode scanner and which is able to both authenticate the the sale with the state server and print the receipt afterwards. Something my 60 year old parents are able to use with relative ease. If I fail to come up something usable in the next 2 months (or my SE friends cringe too much), I'll buy them the shitty software and we'll have to deal with it some other way.

Komentáře

Populární příspěvky z tohoto blogu

Dormking

Asian Squad

Erasmus fin