23 pages

Tweet

Speech Note

I used to think voice typing was a poor technology invented for people who couldn’t type correctly. It’s full of errors after all, especially in Chinese, where many words share the same sound and differ only in tones.

I changed my view after I tried Speech Note, which integrates common voice recognition models. The evolution of voice recognition surprised me with its accuracy. Thanks to my graphics card’s CUDA, it transcrbes Chinese sentences in just a few seconds. Its performance is far better than Google’s voice recognition on my phone.

The minor errors from the model can be easily corrected with AI, making voice typing a much more efficient input method now.

Maybe I type too much and have forgotten how to speak. And voice typing is a great way to practice.

C++ Practice

I haven’t practised much C++. Instead, I keep nudging my python scripts. That doesn’t look good. What kinds of project can C++ make?

I realised it’s not necessary to learn C first…

Stop Teaching C (youtube)


The quote “There are only two kinds of languages: the ones people complain about and the ones nobody uses” is said by Bjarne Stroustrup, the father of C++. https://www.stroustrup.com/quotes.html

What I learn from economics

The society follows the principles of economics:

  • No one should do everything on their own, even if they could.

  • To make a living, you just need to focus on one thing that only you can do.

    • Do one thing and do one thing well, like the Unix philosophy.
    • Ironically, that means as computer science student, I shouldn’t be learning even a little bit of economics.
  • Economic predictions don’t work if we don’t consider factors besides money, such as happiness and health. Since economists can only think in terms of money, we can convert everything we care about into prices.

    • If you think about it, you realise that pretty much everything can be converted into prices.
    • However, if no exchange could be done, this so-called price is not very meaningful.
  • If you want to make a lot of money, be a monopoly. Get a lisence, certificate, degree and anything that gives you the privilege to do the job so you can earn more than you should. Sure, it’s great for you, but not so great for society.

  • Otherwise, if you are in free competition, you need to work hard to be as efficient as your competitors. It’s tough, but it’s better for the consumers. That’s capitalism.

Progress

If I don’t post anything, I can’t feel my progress. If I can’t feel my progress, I get stuck on changing the same text. In term of writing novel, should quantity be favoured over quality? Is there a way to quantity progress if I can’t predict when and how the project is going to be completed?

origami

When I received fliers on the street, I often felt the urge to make use of it. No, I don’t mean making paper planes, that no fun making paper planes. What about origami? (Though technically, making paper planes is origami) I remembered when I was in primary school, our maths teacher had taught us how to craft 3D shapes out of paper pieces.

Now as I am talking about maths, you may notice origami is very similar with constructing shapes using ruler and compass. Actually, I’ve heard origami is more powerful than ruler and compass because it can solve the unsolvable “trisect any angle” problem. When I was still holding the flier and walking, I started wondering what the basic mathematical operations of origami are. The first one could be folding a line in half, which forms the perpendicular bisector of the line. The other one might be folding an angle in half, which gave us the diagonal line. When all they do is to cut things in half, is cutting things in third even possible? I went straight to the library to find the answer.

The answer is stupidly simple: Just fold the line in half two times and cut out the extra segment. It’s like Columbus’s egg, my stubborn mind can’t solve it.

But I still wanted a technical answer. Surprisingly, there weren’t many videos talking about the maths behind origami. Oddly, I could easily learn how to trisect angles by folding paper, but not for trisecting lines, which should be a much easier task.

So I tried that out myself. When using ruler and compass, the knack of that problem is to cast an already trisected line onto the new line using parallel lines. But how to make parallel lines in origami? Just remember that the perpendicular line of a perpendicular line is a parallel line. Let me share my experience: To get a more accurate result, the angle between the already trisected line and the new line should be small to make it easier to fold the perpendicular lines.

New to JavaScript

I was playing “Blood on the Clocktower” with my friends using an web app. As the game progresses, the host sents and receives information to and from the players. But the web app lacks the way for the host to communicate with the players so the host need to directly message the players and wait for their response. This slows down the game.

Since the web app is open source, I thought I may modify the code and host the game on my own website. However, the app could not run on my computer since it was writen in an older verison of Vue. I am new to JavaScript and learning JavaScript frameworks immediately is a bit overwhelming. I thought reading source code might be good shoutcut but now it seems that there’s no such thing, sigh.

Sticky menu

I just want to make a menu that sticks on the pages using CSS, how come this could be so difficult? Even ChatGPT gave me the wrong answer.

2024/06/25 03:44 Problem Solved. The key is to make the max height of the panel be 100vh minus top padding minus bottom padding.

Update breakage

I shouldn’t update the system when I am doing work… what a classic mistake. The bookmark bar of Firefox became blank and the button layout is stirred up. I spent the whole night trying to open new profiles and imported all the setting twice but somehow it couldn’t fix the problem. I have no choice but to remove all the profiles and reinstall firefox.

Joppy updates and spilt its API into clientAPI and serverAPI. I have to change my import statement in my python script to make it work. I now understand why people fixate on old versions.

Bad mood holiday

I hate holiday. It gives me a fake sense of comfort that I could slack off. Time flies no matter what I do. I always get stuck in deep regret and really annoyed by myself.

‘This is such a tiny thing. I shouldn’t be angry and waste any more time on this.’ This meta emotion makes me feel angrier. What a vicious circle, until I can’t take this anymore and cried. After that, I could sit down and write this reflection very easily. It’s hard to admit, but emotion plays heavily of the tug-of-war between motivation and procrastination.

Productivity Tools

Tweaking new productivity tools may not really pay off. Still, I tried Super Productivity and ActivityWatch and they both seem promising. How will the data be useful if I’m trying to gamify my life? I shouldn’t worry too much as long as it is automatic.