Open source packages in the Veikkaus app

I haven’t used the Veikkaus app for a long time, but launched it today on my iPhone. The app had been updated at some point and now wanted to have access to the local network. Which I obviously denied. Why on earth the app for gambling (lottery and such) for money would need to access my local network? Not granted.

Also, what I found interesting is that the reason for the access request was in English, not Finnish, though my device locale and language is set to Finnish, and the app otherwise is Finnish. Is this something Veikkaus messed up, or Apple? Anyways, for a normal non-tech Finnish user, the UX of this permission request was not good at all.

Anyways, that got me interested, and I tried to find a setting from the app that perhaps could tell me more. Didn’t find the setting, but saw that they list the open course components used in the app.

Using open source is always something that interests me. Especially as I was a teacher in an open source software development focused course in our curriculum – a course deprecated long time ago. I remember the first time seeing the Linux license in the papers of the new Sony TV I bought, how it astonished me at that time. That even televisions now contain open course software and include the licenses of such in their packages, on paper (at least then).

I clicked the link in the app to see the components, but for some reason, the list displayed only for a second and then disappeared. I tried again and again, but to no avail. Then I copied the link and pasted it in Safari browser in the phone. Similar issues there too.

Then I sent the link to my laptop, but also there I had the same issues. Next I resorted to curl in the terminal, redirecting the html to a file and opened that in Safari. Again, issues.

 curl https://msa.veikkaus.fi/licenses/mobile_lisenssit.html > lisenssit.html

The html itself is very simple, just the basic opening elements and then a list of the components and their licenses within a <pre> element.

I renamed the html file curl to xml and opened it in Xcode. The file is a 2.7 Mb file, containing not only the list of components the app uses, but also the different actual license texts listed. No wonder the file is so large and browsers have issues with it.

Anyways, the license texts (MIT, BSD, Apache, etc.) start from the line 1 374, after listing the open source components. Though some of the components are listed twice, with identical version numbers – don’t know why, so the true number of used components may be much smaller. Also, there are empty lines in the original html, so that also must be considered.

@adrianso/react-native-device-brightness              1.2.7         MIT                                                                                                                     
@graphql-typed-document-node/core                     3.2.0         MIT                                                                                                                     
tslib                                                 2.6.2         0BSD                                                                                                                    
tslib                                                 2.6.2         0BSD                                                                                                                    
@wry/context                                          0.7.3         MIT                                                                                                                     
@wry/context                                          0.7.3         MIT                                                                                                                     

After stripping out empty lines (and lines with whitespace characters, searching and replacing) and duplicates using sort and uniq command line tools…

 more cleaned-list.xml | sort | uniq > final.xml

… I can see that there are a total of 1 064 open source components used by the Veikkaus app, including often different versions of the same component:

@babel/compat-data                                    7.26.8        MIT
@babel/core                                           7.22.15       MIT
@babel/core                                           7.26.9        MIT
@babel/generator                                      7.22.15       MIT
@babel/generator                                      7.23.6        MIT
@babel/generator                                      7.25.6        MIT
@babel/generator                                      7.26.9        MIT
@babel/generator                                      7.28.6        MIT
@babel/helper-annotate-as-pure                        7.22.5        MIT
@babel/helper-annotate-as-pure                        7.24.7        MIT
...
which                                                 2.0.2         ISC
which-country                                         1.0.0         MIT
wonka                                                 6.3.5         MIT
wrap-ansi                                             7.0.0         MIT
wrappy                                                1.0.2         ISC
write-file-atomic                                     4.0.2         ISC
ws                                                    6.2.3         MIT
ws                                                    7.5.10        MIT
ws                                                    8.18.1        MIT
xcode                                                 3.0.1         Apache-2.0
xml2js                                                0.6.0         MIT
xmlbuilder                                            11.0.1        MIT
xmlbuilder                                            15.1.1        MIT
xtend                                                 4.0.2         MIT

I guess this is what modern software development is, nowadays. Or maybe their software BOM (Bill Of Materials) is not quite up to date, don’t know.

(You may wonder why do lottery? Well, I know very well about the odds of actually winning large sums of money. But sometimes the modern (work) life is so … so something that the hope of getting rid of it all is so overwhelming that I resort to desperate actions… The money I spend is very little, and this happens only spuriously, so no need to worry about any gaming addiction.)

Vacation!

I usually start my summer vacation from Midsummer. This year that’ll mean that the last workday is today 🥳 I’ll be returning to work in the beginning of August.

So far, I’ve been busy in several fronts, including supervising and evaluating MSc theses and planning and organizing the teaching schedules and resourcing for the Fall. We eventually got one half time student assistant to help us in the courses for the Fall semester.

We were required to provide at least some face-to-face teaching for 1st year students, since complaints this study year about only online/remote teaching offered. It is “a bit” difficult to organize classroom teaching when the total number of students is 900+ and there are only two full time teachers and two other teachers who have only some hours allocated for these three large courses (plus one smaller) we need to organize. Especially when the remote possibility is a must, not an option, since these courses have Open University students and students from other Finnish universities participating.

Anyways, we again tried to fulfill these requirements with the little resources we’ve got. In some earlier years, we have had two halftime student assistants, last year only one and that’ll be the case for next Fall too. Not even comparing to 15 years ago when we had like ten+ student assistants helping out in various courses. Things really have changed from those days. Let’s see how we cope this time…

Another big thing I’ve been working on is implementing new programming tasks for my Data Structures and Algorithms (DSA) course. The passing ratio of the course is too low. I am again trying to find new ways to make the course more straightforward to pass.

Last year I made explicit paths to pass the course so that the students could take an easier path with less programming to get the grade 1. If someone wanted a higher grade, then they’d do additional programming tasks. And if someone wanted a high grade (4-5/5), then they were also required to participate in one-to-one evaluation discussion with me, talking through the algorithms and data structures they implemented and analyzed in their reports.

Before last year’s changes, most students got a grade 3-5. After this change, most students got the grade 1, then some the grade 2 and minority got grades 3-5. Not sure which change contributed to what extent to this change in the course output.

Unfortunately, the passing rate did not improve regardless of these changes. Most of the students that fail actually either never start doing anything, or they do at most the 1-2 first programming tasks (which actually were based on the previous prerequisite course contents) and then disappeared. Maybe they just decided that the course is too challenging considering their prerequisite knowledge and skills? Or they had more important courses they prioritized?

One reason may be that DSA is no longer a prerequisite for any other course in the curriculum. A couple of years ago it still was a prerequisite and students needed to pass DSA to get into Programming 3 (server side stuff). That was then required to enter Programming 4 (GUI programming) and via that path, getting in the BSc Project course was not possible without passing DSA first in the chain. As the prerequisite DSA ⇒ Programming 3 was removed, it may well be that DSA will be one of those last ones they try to pass before getting their BSc degrees, together with the compulsory Swedish language course… Maybe the hypothesis was that DSA is useless for the courses coming after it. Not that I agree with that…

The issues of plagiarism and using AI to avoid learning and doing things have somewhat increased during the last 2-3 years. These issues are not too widespread yet (?), but still clearly on the rise. I’ve now used the same programming tasks for two years, and it is apparent that some are getting the solutions copied from somewhere.

Luckily there are lots of students that are willing to do the work and walk the path, regardless of the challenges — always very motivating to the teachers to see. It is very rewarding for us teachers to discuss issues with students, walk them through their problems, seeing their joy of finally solving difficult issues and at the same time see them learn and gain skills that are important for their professional development as software developers.

Items from above were the motivation for me to implement new programming tasks for the DSA course. Most of the task learning objectives are the same as before. I decided to drop the first task that was just revisiting the insertion sort algorithm taught already in the prerequisite course. That algorithm is now given to the students, as they are supposed to know it already. So no two weeks of course time is spent on that anymore.

Instead, the first task focuses on correctness, first of the two important learning goals for the DSA course, the other being time complexity (to some extent also memory complexity). They’ll learn to use invariants to ensure code is behaving correctly, including pre- and postconditions, as well as loop and class invariants, implemented with asserts and thrown exceptions.

I’ve brought back the partitioning algorithm task back from 2021 course implementation. The binary search tree task will be a bit easier; the current task is too challenging because the context of applying it makes it too large a task to do. So that’ll be simplified.

Furthermore, all of the tasks where they apply the generic algorithm or data structure they first implement, will change. There will no longer be a single example app using all those algorithms and data structures they implement. Some students did value this concrete example with a GUI; seeing a real world context where all this they are supposed to learn, is actually used and needed. But for many, this context was too large, too much code to digest and understand, they got confused and felt lost. In the next DSA, each task they go through will be in a separate, small and simple(r) component, focusing only on a specific algorithm or data structure and how to apply it and analyze it.

Another of my goals is also to move the course exams from Moodle to controlled computer exam class. It is apparent that the Moodle exam is too easy to do in a way that doesn’t measure the students’ actual knowledge of the topics. Maybe the new setup does this better, if I manage to prepare the new exams in the new environment in time for Fall…

The new set of programming tasks has 11 different tasks, and I’ve currently (re)implemented five of them:

  • Assess and support code correctness of algorithms by using asserts, pre- and postconditions and loop and class invariants.
  • Recursive binary search, comparing time efficiency with linear search.
  • Partitioning an array using a predicate, filtering utilizing the partitioning algorithm.
  • Quicksort, comparing it with insertion sort and partitioning/filtering, when sorting is not actually necessary.
  • Stack, using stack to check XML correctness (parsing code is given).

That leaves six tasks to be finished in August, before the course begins in September:

  • Queue.
  • Linked list.
  • Binary search tree, applying it to count unique words in Project Gutenberg books / frequency of person names in datasets.
  • Hash tables and hash functions, possible application is the same as with binary search tree, to compare time/memory efficiency of these two ?
  • Using the Set in Java (not implementing it).
  • Something about Graphs (breath/depth first searches?), or leave this to theory only, depending on the estimated student workload.

As usual, all tasks will have automated unit tests and also the code is analyzed by using tools that I’ve discussed in some of my previous posts.

To get all this done in time, it’ll be a busy month in August. Especially when I want to avoid having errors with the material given to students. I should reserve time to test and assess the code and the instructions so that I do not have to post too much errata when the course starts…

In the past, I did use the summer time to do these kinds of teaching development work, but since the past 2-3 years, I’ve decided not to sacrifice myself to work. Vacation time is my time, not the employers.

Hopefully you, dear reader, have also the time to relax during your vacation time, whenever that might be. Have a nice Summer! 🌞 (or Winter if you locate at the other side of the globe, don’t actually know if it is dry or rainy season in between 😃).

Slowly out of Corona virus

I got the corona virus again, the second time for me. Previous infection was in August 2022, and then it was really bad. I had a terrible headache and very, very sore throat for two weeks. Couldn’t event swallow saliva without much pain, even though I ate the max amount of over-the-counter pain killers.

This time was not as bad but still quite bad. Partly the same symptoms but now it was more like a really bad flu with almost as bad headache and sore throat as last time. It’s almost three weeks since I got the first symptoms and it is still not over.

Anyways, I did have the energy to solve Advent of Code days 10 and 11 during this time, when I wasn’t yet feeling too bad. Just didn’t have the energy to write anything about the solutions here. Also managed to solve part 1 of day 12. Since then, nothing.

I still have cough, sneezing every now and then, a feeling of having a flu and am also very tired. The whole Xmas break, as well as new year, and all the days in-between and after was spent just being sick. Didn’t see any family or the kids and their families during the break, to avoid infecting them.

We had great plans to rest and recuperate after the busy work period from September to December; just rest mentally, go skiing and running, eat good food, go sauna, meet the family, etc. So that we’d be well rested when teaching begins next week.

Instead, we are just tired, consumed by this fucking virus. Hopefully no long covid comes out of this, that’d be too much.

Let’s see if I bother to write about the solved AoC puzzles and/or continue to solve the remaining puzzles later on. Because it seems that I have more student projects to supervise than last year, with larger groups. That seems to be a trend nowadays, each year more students, less resources (teachers and hours) to do the work, actually teaching students stuff. This is so bullshit but hey, what can you do.

The student projects start next week, when I am supposed to contact them all and kick them off. Also, next week I need to start grading the Data structures and algorithms course projects, as well as prepare the final exam for that course. That’s already a lot of work to do, in this shape I currently am. Going to take it easy…

Finally fiber

The long wait is over and the fiber optic internet connection at home is finally up and running.

We had a 5G mobile internet since summer one year ago. It was constantly dropping outgoing packets though the speed was OK. due to dropping packets it was practically impossible to teach live over Zoom. My voice and video had more issues than not. Strangely, using my phone to connect worked much better, but then the phone operator was different from the home 5G operator…

I’ll have to extend the WiFi to the side building, where I work, with a mesh. The long time plan is to extend the networks there with Ethernet when I plan how to route the cable.

Speed test using the phone over WiFi.

Home network improvements

The new and the old router

Last summer, when we got the new 5G network from the operator, replacing the 4G, they delivered a new router for us (on the right side of the picture).

Having a two storey house with a tin roof and a side building where I work, that little router could not handle the range needed at all. I tried to configure an old Asus router to act as a repeater for the white thing, but that did not help at all.

So, after using the phone network at the side building for a while, the frustration finally grew to intolerable levels and I went to Verkkokauppa and bought that monster on the left.

Since it is also an Asus router, the old Asus Wi-Fi router and the monster are now configured as a mesh. Goodbye networking problems.

Other news: busy at work, grading Data structures and algorithms course projects. That is put on hold from Monday for three weeks, when I spend all my free working time in student admission work. Since I am again the only teacher doing the grading, this will take some time…

The way teaching resources are diminishing each year as the number of students is rising each yer, is a constant source of frustration to me. Last Fall I was teaching 3-4 courses at the same time totalling almost 1000 students, having only two full time teachers and two part time assistants is not fun. AFAIK, next Fall is going to be probably worse. No like, no like at all.

So no resources means everything is delayed. Anyways, the rest of the work time in the coming three weeks, around 5-10 hours per week, are spent in watching over BSc project work groups. Each group has six students, and they are supposed to work on software projects for external clients. During the next three weeks, the first steering group meetings are supposed to accept the project plans for these projects. Lots of guidance giving, reading plans, giving feedback and meetings, that is.

All this is slowed down a bit me having a flu since Tuesday. All face to face meetings were changed to online meetings. Suits me well, don’t have to dress up and move to the campus, taking time from other things. But then I need to make sure I get light walks done on free time. Not too sick for that, luckily.

I miss my friend

Nuki is my friend. He is a Japanese spitz, born 13th July 2009.

Each morning he wakes me up early with a soft murmur. I get up and dress, drink a glass of water and give him his medicines. He has issues with his joints and gall bladder. He likes to take the medicine with a slice of chicken fillet.

Then I put on the clothes, considering the weather I check beforehand, his vest and go to check out the neighbourhood. He is very keen on guarding and patrolling “his” area, marking it for any intruders to know he is the king here. Oftentimes, I would talk with him about the weather, observations about the environment, and commenting him about his bad behavior towards other dogs. He always made very clear to other doggies about them not having the right to be in or around His Kingdom.

There are only three or four other dogs he ever accepted as a friend. In our current neighbourhood, there is this one small, old black poodle lady, and another Japanese Spitz, younger lady that he likes. Others are just Enemies that must be banished.

Then we return to home to prepare us breakfast. Since he is already old, I am not so tight about serving him treats in addition to the doggie breakfast. When I will have a glass of sour milk, I will also pour some for him in a small glass cup. And he gets to lick the inside of my glass when I’m done. Often also he waits by me for the last small piece of my bread, which I will offer him. When making porridge with frozen bilberries, he often likes to eat those too, one by one, from my hand. Good for your eyes, you know.

We are friends and we share what is good and tasty.

Then he takes a nap as I go through my work email with the laptop on the sofa. Lately he has started to come beside me to ask for some scratching and massaging his aching back. In human years, he is around 100, not the youthful healthy himself anymore.

Before I go to my remote workplace in the side building of our house, I often treat him with a piece of biscuit. For some reason he doesn’t like to come there but likes to stay in the main building. Never got to understand why that is.

When I return to main building for a cup of tea or lunch, he is often sleeping on the entrance floor and woke up to greet me. And of course, he is again very interested in what I was eating. And if there would be any treats for him too.

We used to take the afternoon walk around 1-2 pm, but lately he wanted to go earlier. Probably because of his age and the health issues. This walk was usually the longest one. We often took a route around the residential neighbourhood here. The area has lots of trees and walking paths in the forest. Very nice for a nature loving dog and his masters.

Then I continue my work in the side building usually, if not sitting on the main building sofa with the laptop. All of my teaching during and after the pandemic has been remote, also meetings. So I rarely went to the campus for meetings or events. Nuki of course liked this. If in the main building, he’d always get his scratching service, if I was there. Of course, the other humans in the building were also usable and utilized for his pleasure, but as the head of the pack (at least for him), I was the often the human to go to.

We also have a cable outside where I could attach him so he could enjoy the fresh air, observe the birds, chase the squirrels and stare at passing other doggies and humans. Lately he didn’t want to go there, probably because of freezing temperatures and his aching joints.

After work and the evening stroll, we would often watch the telly in the living room. On Fridays, we have a pizza evening with red wine. Nuki always got to eat the sides of my pizza. Since I am such a lousy master what comes to discipline, he was often quite vocal in making sure he got his share. To me it was often quite amusing, the way he made those sounds to make sure I knew what he wanted. In addition to pizza, potato chips were also his favourite although a rare treat.

Last week Nuki’s walking got increasingly and quickly more difficult. He had his joint medicine injection on Friday, earlier than planned. That did not help. On Friday evening, he could no longer get up. In the Saturday morning, January 13th 2024, I tried to get him to his morning pee, but we ended just sitting in the dark and cold, snow slowly covering us in the back yard. We lifted him in a large bag with a blanket and I took him to the vet, him sitting in the front seat while I scratched him and talked to him all the way, driving to the other side of the town.

Vet said there is nothing that can be done, considering his health and age, without extending his needless suffering. Which I kind of had accepted already for some time ago, that our shared journey would be coming to an end. He was paralyzed from waist down and could not pee. Nuki was put to sleep and then sent to his last journey to where ever, I don’t know. I sat by him to the very end, caressing him, accompanying him during his last moments. No more pain and suffering for Nuki.

Now there is no one to wake me up in the morning. No Nuki to share my breakfast. No friend to take me to walks in the morning, in the afternoon or in the evening. No one to make sure our borders are guarded against hairy enemies. No one to bark and greet incoming visitors. No one begging to lick the glass clear when I finish my sour milk. No one to share the biscuit with my afternoon tea. No one waiting for me to come home on the mat at the front door. No one to scratch and talk nonsense to. No one to share the fried yellow of the egg another human in the house does not want to eat. No sounds of pawns tapping on the wooden floor as he woke up from his sleep. When I see a glimpse of movement in the corner of my eye in my work room outside the window, it is not him there, watching over me.

I miss you, my friend.

Blasts from the past

Two blasts from the past. Sorry for the long post but hey, this is a frigging blog, not some social media service for attention spans of mere seconds.

First “blast”

When teaching (exercise support sessions) over Zoom, we course teachers have a private chat in Slack to coordinate who goes to which breakout room to help students asking for help. When there’s no acute problems to address, we occasionally chat about random topics.

Yesterday I was participating from the bed using my laptop since I’ve got the flu but was well enough to participate somewhat.

I have had this idea to write the Data structures and Algorithms course materials into a book format. Not to be sold in book stores, but just shared to the students as a single PDF / eBook file.

I remembered doing exactly that, very very long time ago in a discontinued course, and happened to mention this to the other teachers in Slack; that I couldn’t find the book in my computer archives.

“Hold my beer”, said one of the teachers, and voilá, he uploaded that course pdf “book” from 1999 to the Slack channel! As it happens, he was at that time or just before, a student on that course and had archived the material! He is a lot better than me in archiving, apparently, so thanks JLa for that! He also participated in teaching (also) this course, as far as I can remember.

A snippet from the course material for Programming environments course.

The course, Programming environments, was originally a Mac programming course, by our Department Mac guru who left us a long time ago to work in the industry (good for him). Then later, I implemented the course for programming with C in Windows (thanks to Petzold’s book). Even later I also implemented a version to teach Symbian C++ programming in Nokia devices.

Anyhows, I liked the idea to provide the material in a “book” format to the students, and even distributed the book in an eBook format for them to read. A total of 45 pages. I wish I’d find the original editable document somewhere from my external backup drives or USB drives, would be fun to have it.

Maybe I’ll do this sometime again for some course. Writing can be fun.

The second “blast”

A thing I did find when browsing through my archives, was a department plan to arrange teaching for the study year 2009-2010.

Especially interesting for me was to check out the list of courses our team (software engineering focused teachers/courses) at the department taught that study year (table below).

I will just list the courses about programming or strongly programming related or strongly technical courses:

Finnish course nameEnglish course name
AlgoritmitAlgorithms
C ohjelmointiProgramming in C
C++C++ programming
Johdatus kääntäjiinIntroduction to compilers
Johdatus ohjelmointiinIntroduction to programming
Johdatus tietorakenteisiinIntroduction to data structures
LogiikkaLogic
Ohjelmistojen testausSoftware testing
Ohjelmointikielten periaatteetPrinciples of programming languages
Ohjelmointityö IProgramming assignment I
Ohjelmointityö IIProgramming assignment II
Ohjelmointityö IIIProgramming assignment III
Ohjelmointityö IVProgramming assignment IV
OHJY/MacOS/iPhoneProgramming environments / Mac/iPhone
OHJY /  WindowsProgramming environments / Windows
OHJY / UnixProgramming environments / Unix
OHJY/ SymbianProgramming environments / Symbian
Olio-ohjelmointiObject oriented programming
Projekti ITerm project for external customers, programming
Projekti IITerm project for external customers, often included programming
Rinnakkainen ohjelmointiParallel / concurrent programming
RTCSReal time computer systems
Tietokantojen perusteetIntroduction to databases
Unix perusteetIntroduction to Unix

In some of those courses, doing actual programming by the students might have been a relatively small part of the course. And some of the courses were not offered every year. Just not to inflate the amount of actual programming done in some of these courses.

But – if you compare these strongly programming focused courses of that time to the list of current programming or strongly technical courses in the study program:

Finnish course nameEnglish course name
Laitteet ja tietoverkotDevices and Data networks
Ohjelmointi 1Programming 1
Ohjelmointi 2Programming 2
Tietorakenteet ja algoritmitData Structures and algorithms
TietokannatDatabases
Ohjelmointi 3Programming 3
Ohjelmointi 4Programming 3
Ohjelmistojen laatu ja testausSoftware Quality and testing
Bachelor projectProgramming project for external customers
Master’s projectSystems development /analysis project for external customers

So at that time around 2010, we had a total of 24 very technical/programming courses in old study program. Currently we have only 10.

There are courses on software engineering and such nowadays too, but they usually do not include learning to construct things and spending a relatively significant amount of time doing that – that is what I mean by a technical course here, and what was done earlier.

The current study program at the MSc level does not have a single course focused on programming. No more than 5-6 years ago, we still had at least one, Embedded software development environments, focusing (mostly) on distributed mobile programming (taught by me and some other teachers). Before that, we (including me) taught, together with Tampere University of Technology, Mobile systems programming course (Symbian, J2ME). All discontinued.

Currently we have nothing about parallel / concurrent programming in the study program. Last week I did one very small demo to at least show an extremely little thing about concurrency in my course on Data structures and algorithms. To let the students at least to be aware that something like this actually exists and could be done. So like 15 minutes of that topic in the whole study program.

Principles of programming languages, logic, compilers — totally gone from the study program in just over ten years.

You know (and I know) that there are as many opinions than there are you-know-what, but in my personal honest opinion, this is not good. Considering the needs of the local software industry.

Of course the technical topics of today would be perhaps different and obviously should be up to date with modern technologies. But if these kinds of topics and the deeply technical perspective on things is missing, there is not even the chance to discuss if they would or should be updated.

Well, maybe this is just another case for this:

Image of an old man yelling at the clouds from the Simpsons
Old man yelling at cloud, again

No more sadness

Just checked out for my Computers and computer networks course that there is no more sadness since the Willab weather service works again!

The API has changed from HTTP to HTTPS, and the JSON data structure returned has also changed a little. So I needed to change the demo apps that get the current weather from the service.

This week I’ve again taught how to use curl from the command line, how to see the HTTP traffic using Wireshark and how the two demo apps do HTTP GET to access the weather data from the service.