This is the second part previously announced. In the first part we have configured the discount-card-for-frequent-customers-application and we recorded the attendance of a few participants. In this video we will be live coding a report that will allow us a more common view for an attendance app.
Video live coding a report for the attendance app
- [0m 45s] Welcome.
- [1m 45s] Showing the faena app running in wine (it's another app, not published yet)
- [3m 50s] Seeing the report that we will port from the faena-app to the attendance app.
- [5m 35s] Locating the source code that we will port into the attendance-app on the faena-app source code.
- [7m 40s] Creating the attendance-app branch in the git repository of the haircut app.
- [7m 57s] The branch was not be created, as there are modified files in the repository.
- [8m 45s] Reverting changes on the modified files.
- [10m 25s] Committing to haircut before creating the attendance-app branch.
- [10m 50s] Creating the git branch attendance-app.
- [11m 50s] Looking for the code that we will port onto the attendance-app again.
- [14m 25s] Found source code in contr_custom_report.c in faena-app.
- [17m 45s] Showing attendance-app running using wine.
- [18m 15s] Searching in which file of the attendance-app the could should go.
- [24m 00s] And the selected file is contr_customer.c
- [24m 20s] Starting the import from contr_custom_report to contr_customer.c
- [25m 30s] Renaming imported function to proc_hc_attendance_report
- [31m 45s] Importing second function to contr_customer_attendance_report_date_range_helper
- [37m 00s] Inspected the fields of a table in haircut's sqlite3 database.
- [38m 50s] Importing the third function to contr_customer_report_get_attendances_and_chk_appointments_presence_tantay_helper
- [44m 00s] Marking the pending functions to port.
- [51m 00s] Trouble filtering a feature.
- [52m 54s] Back to live coding a day later.
- [53m 40s] Porting contr_maintenance_get_single_string_value_from_query
- [61m 30s] Looking for the function that returns the TemplateRpt frame.
- [63m 00s] Compilation passed without errors.
- [64m 00s] Copying the binary to the folder where we demoed the first video.
- [64m 50s] Calling the newly compiled binary.
- [65m 15s] The attendance-app is displayed
- [65m 35s] We realize we haven't added the report to the menu.
- [67m 50s] The text variable that sets the menu dynamically is in the resources table of the database.
- [69m 20s] Showing the text variable content from where the menu is composed.
- [70m 00s] Copy the variable content to a new buffer.
- [70m 35s] Adding a line to the main menu. The line that would let us call the report.
- [71m 20s] Adding call to the method that shows the report in the source code.
- [72m 40s] Defining the number in hexadecimal that has the procedure that shows the report.
- [75m 15s] Modifying the hexadecimal number of the procedure in the menu.
- [76m 15s] Updating the record in the database from the main menu of the attendance-app.
- [78m 30s] Executing the sql sentence from the command line.
- [81m 30s] Command line errors.
- [83m 25s] Running the binary, the dynamic menu is already shown, but pressing the button does not show the report, (it is because we have not compiled the binary properly, later in the video we will realize it)
- [87m 25s] Copying database to development folder.
- [88m 00s] We realize we hadn't compiled the binary (after making source changes we should always compile)
- [89m 05s] Compiling binary for win32.
- [89m 55s] Running the binary for win32, no data is shown in the report.
- [91m 55s] Compiling a binary for GNU/Linux.
- [92m 10s] Running the binary for GNU/Linux.
- [92m 35s] The execution log shows the error with one of our SQL statements.
- [93m 15s] Correcting our SQL statement in the contr_customer.c file
- [95m 00s] Recompiling for GNU/Linux.
- [95m 10s] Running the binary for GNU/Linux.
- [95m 20s] The report is shown with the data that we entered in the first part of the attendance-app.
- [96m 45s] Compiling binary for win32.
- [97m 50s] Running binary for win32.
- [98m 35s] Taking attendance on the video.
- [98m 56s] Problem 2 records were saved for the same day (this is corrected with a setup, so that the user should confirm when you want to add more than one record for the same day)
- [99m 48s] The data in the report was not updated properly (the changes we just added are not reflected)
- [100m 03s] Restarting the attendance-app, it will only be momentary, we will correct that problem later.
- [100m 23s] The new data is displayed in the report.
- [102m 58s] In this part I was wrong, for reflecting the data changes It would be needed to have taken attendance for a different person on this day
- [105m 55s] Some noise.
- [109m 58s] Adding the line that cleans the report data every time new information is added.
- [110m 00s] Saying goodbye.
Watch the application demo below(right click "view video"):
Help for watching the video
On the 'Audio and Video Controls' right-click for opening the 'Context menu controls'. On the 'Context menu controls' Select 'Copy Video Link'. Then open a New Tab. Ctrl-l, Ctrl-v, Enter.
The 'Audio and Video Controls' are above where there is a message 'No video with supported format and MIME type found.'
Video url (click)
Last change: 29.11.2022 19:50