-
an [[adventure]].
- #go https://eli.li/december-adventure
- Do some coding on something that you care about, or that you just find interesting, every day of [[December 2023]].
- I'm in!
- My default project will be the [[Agora]] (are you surprised?) :)
I started on December 1st, meaning [[2023-12-01]], after midnight -- I think it still counts as I hadn't gone to bed yet at 2AM when I started finally coding the fix for the Agora I had planned, and in UTC it was still the first :)
I learnt about the challenge from [[bouncepaw]] ~ [[@bouncepaw]] in [[Flancia meet]] around 11 UTC on [[2023-12-02]] and I was immediately in.
December adventure is a yearly challenge. The goal is to code //something// every day. Anything. I'm in this year.
=> https://eli.li/december-adventure
NB. As of the start December 2023, I'm still not done with [[Inktober 2023]].
December 1st. Doing a Java assignment for the University. Somehow installed an outdated Mongo DB. I tried to install a new one, but the modern tech hates the old 2020 OS I use on [[Caemlyn]]. The outdated one was found in Nix. Thanks Nix, the only package manager that never fails to install. I didn't learn Mongo though, not yet.
Then I started integrating Lombok, which is a library to reduce boilerplate. Pretty nice!
And during the night I was starting to get the 100 % code coverage. There's still job to be done!
December 2nd. Continuing doing the same assignment. Writing more tests, increasing the coverage. One of the subtasks is to implement the conversion from our classes to BSON documents. Made a //Factory//. I feel like a serious enterprise Java developer. Have I told you that I want to implement [[Betulopticon]] in Java?
Thought about [[Uxn Legoptics]]. Surely, if I ever do it, there will be no Java in it. Wrong tool.
Wrote more tests. Ran a //SpotBugs// lexical analysis. I don't wanna fix this...
December 3rd. Postponing Java, doing the Information theory task I have. We've got a table with information about Titanic passengers, one of the column says if they were dead or alive. We gotta make a simple model for predicting if we would have lived. The instructions are detailed enough, but I am getting weird results for some reason...
I am doing this task in R btw.
December 4th. Continuing the R task. I am the only one doing it in R, by the way. Most people are doing it in Python+NumPy or C#. NumPy is a good choice, of course. But why would they go with C#? I asked them. They said they are just used to it. Get used to something more fitting the task! Oh, whatever.
So, my problem yesterday was that the data was not normalized. After Z-normalizing it, everything worked. For your information, //my// chances of surviving on the Titanic shipwreck would have been 44 %. That's what they numbers say!
December 5th. Turned in the R assignment. I also improved it during the classes. The teacher marked down a plus, as he always does. One plus remaining. Look at the code sample!:
# ...
zdata <- (t(as.matrix(data)) - data.mean) / data.stddev
zdata[1, ] = 1
log.mle <- function(theta) sum(log(
((1/(
1 + exp(-crossprod(theta, zdata))
)) ^ outcomes) * ((1/(
1 + exp(crossprod(theta, zdata))
)) ^ (1 - outcomes))
))
dot <- function(a, b) a %*% b
mygrad <- function(theta) {
res <- 0
for (i in 1:n) {
x.i <- as.numeric(zdata[, i])
a <- as.numeric(outcomes[i] - 1/(1 + exp(-dot(theta, x.i))))
res = res + a * x.i
}
res
}
# ...
I think the mygrad
function (that is, my gradient function) could have been made more fancy with some matrix multiplication, but I didn't have enough thoughts for that back then, and now the task is turned in and I don't have time for any extra.
Finally understood what am I to do for the Computer Networks assignment! Understanding was the tricky part. OK I now have the knowledge!
Right before midnight started doing the Computer Graphics task. Will continue tomorrow. The task is massive. Will have to devote a lot of time to it. Today I programmed the various affine transformation matrices. For example:
def mx_rotate_oz(angle):
angle *= radians_in_degree
return np.array([
[cos(angle), -sin(angle), 0, 0],
[sin(angle), cos(angle), 0, 0],
[ 0, 0, 1, 0],
[ 0, 0, 0, 1]
])
December 6th. Didn't have a chance to devote enough time for the Graphics task. I wanted to turn it in this week, id est tomorrow, but it's not happening. I doubt I'll be able to turn it in next week. The teacher clearly made a bad job estimating the time needed. How classic of him.
At night, reached the 100 % coverage in the Java assignment. Of course, all this testing is a lie.
December 7th. Didn't have much time, we were filming a clip for the Economy assignment. Did some Graphics and barely progressed.
December 8th. Turned out, I didn't actually have a 100 % coverage. In a hurry, made it 100 % and turned the assignment in. Good.
Late evening, a friend sent me their code for the task. They had experience with graphics before so they could advance this fast. Removed everything not related to rendering the wireframe. After some heavy modifications managed to render a fish.
img { https://assets.merveilles.town/media_attachments/files/111/546/770/584/705/751/original/fda3c193f4366bab.png { The [[fish]] wireframe. [[On Fediverse]] }}
December 9th. Was doing a bit of Graphics.
December 10th. Was doing a bit of Graphics. The textures don't render for some reason! Oh whatever, started doing the Computer Networks assignment. After a lot of efforts, managed to calculate some streams or whatever it's called in English. I'm not sure if these are correct results, will verify later. Then got motivated for Graphics, made the textures render. They render wrong, but they do render!
img { https://assets.merveilles.town/media_attachments/files/111/557/904/893/832/275/original/103416a272fe0187.jpg { One wrong render. See [[other rendering on Fediverse]]. }}
December 11th. Doing the Database assignment before sleep. Broken my favorite cup :-(
December 12th. Doing the Database assignment. Shown my progress with the Networks to the teacher, he approved.
At night did some WebFinger work at [[Betula]]. First time I coded for myself and for Uni this December.
December 13th. Yay, I figured out what the problem with the DB was! The trigger was triggering (a pun intended) the problem, though it was impossible to guess that from the error message.
December 14th. Yay, fixed the texture rendering!
December 15th. Did the final Information Theory assignment. Worked on the Database assignment.
December 16th. Finished the Database assignment. Worked on the Networks assignment.
December 17th. I think the Networks assignment is finished, basically?
December 18th. Started the final Java assignment. A web server with Spring? Argh, so much work to do!
December 19th. Suddenly got so incredibly sick that I can't do anything today. Like, at all. Just lying there.
December 20th. Finishing the Graphics assignment despite the illness. So much work and so hard to work...
December 21st. Despite barely walking, had to go to the university to turn in the Graphics assignment and defend it. Did so very well; got 19 out of 20 points. The teacher liked my work.
December 22nd. My teammate finished the report on our Networks assignment and we sent it. I did another UML diagram along the way. This subject is complete alhamdulillah.
December 23rd. Continuing the Java assignment.
December 24th. Did some Java. Then lost motivation. I guess I'll just... not finish this one. Whatever, I don't care.
December 25th. Did some Python programming on paper for grading.
December 26th. Polished my Java program just a little bit to get the grade.
December 27th. Submitted my final report. Who reads these reports? Nobody. Whatever, we have to do them. No more assigned code until the next semester. I can code for myself at long last.
I didn't code nothing until the end of 2023.
- public document at doc.anagora.org/december-adventure-2023
- video call at meet.jit.si/december-adventure-2023