Sunday, December 20, 2020

Unwanted Phone Apps

 



So, there was a mandatory phone update. It came with app installers. Of the recommended apps, I only chose The Weather Channel.  So, what's with all the other apps? I have no desire at all to use them. So, now I have to delete them all manually.  I firmly believe that if an app need to be forced installed, it's not only useless, but also harmful. So, even though I selected The Weather Channel app, I end up deleting that also. Just can't trust anything anymore. 


Thursday, November 26, 2020

PS5 Scalper

 


Sometimes, you just have to  wonder if there's a limit to human stupidity. I, for one, refuse to buy anything more expensive than retail price. 


Tuesday, November 24, 2020

104 WPM

 


I was able to type very fast. I keep wondering how I did that because I wasn't able to type this fast on 10fastfingers.com and yet I was able to do it here consistently. 

About the only thing that I can think of is that I spent a lot of time beta testing my typing program and that loosens my fingers somewhat. I definitely noticed smoother typing, not as jerky as before.

All things considered, I'm happy to type a consistent 100 WPM. I think I'll finish the Typing Tutorial program.  I already had the finger lessons done. It only took a couple hours to do. 


Wednesday, November 18, 2020

100 WPM Goal Achieved!

 


And this is the result of the different evaluation method. 100 WPM effective. 

Using word based scoring,  I typed 10 words wrong.

Using character based scoring,  I typed 8 letters wrong. Seems like I typed "R" character wrong 3 times. 

Quite a big difference in scoring.  I would've scored 91 WPM using word based. Character based yields 100 WPM. Honestly, this is the first time I hit over 100WPM raw. I'm happy with this performance. 

Oh, I didn't bother setting the date. So, that's an old date.

Not a bad result going from 77 WPM on Sep 29 to 100 WPM on Nov 18.


DIY Typing tutor

 


The Typing Tutor program is coming along well. I have finished making up 21 lesson plans, and daily practice will come from there. Quotes will need some quotations, like typeracer. Badword is words you mistyped. Custom will be like custom lessons similar to keybr. Retry is basically repeating the practice without it creating new text.

Another improvement is that the timer won't start until you start typing. It is very desirable behavior. I still can't believe that it's possible to be done in bash.

So far so good. I still have to decide in file/directory structure. I will also use some hidden files. Maybe also change the scoring,  instead of word based, it'll be character based. That will give me higher scores.

Coding it isn't really that hard. Design, that's hard.

Monday, November 16, 2020

Lunch Journal #8

 


Simple breakfast of Egg, potato, and mashed ground beef. I think I need some veggies. Well, that's what multi vitamin tablets are for.

Eaten right off pan for ease of cleaning. 


Thursday, November 12, 2020

Bug in MagPi pdf files?

 


I am trying to convert pdf files to images, and trying out different resolutions as well as jpg and png formats. Somehow, the jpg format is rendered incorrectly. Not all of them, though. So it looks like the conversion will fail with sophisticated multi layered pages.

I can make do with png format, but this was disappointing. 

Looks like a lot of MagPi magazines have faulty pdf format in there. I get a lot of errors when reading them using command line pdf tools.


Sunday, November 8, 2020

Lunch Journal #7

 


Rice, Tilapia fish, kimchi, egg. People told me that Tilapia is a bad kind of fish, but it's cheap. The alternative of not eating it would be fish oil capsule.


Friday, November 6, 2020

DIY Typing Tutor in Bash

 


So, when somehow the 10fastfingers.com broke on me, I was left with no good way to practice typing. Well, I decided to write my own. Using BASH. That's shell scripting. 

I learned quite a bit about shell scripting, but there's more to do still. The biggest problem is not the coding. Actually, the biggest time sink is the design. I'm on my third design and still going on. 

The whole scripts is only about 4K. So, recreating this should only take an enjoyable afternoon. There's some advanced manipulation there, though.

Since this is done on Raspberry pi, I use pdftotext to extract texts to create my dictionary.  Turns out it's relatively quick, even on my RaspiZero. 100 most popular Project Gutenberg texts, however, took about 20 minutes to process all dictionary, the longest being top 100, 200 most common words.

I will update this later. I got some ideas about vt100 terminal cursor manipulation. 


Monday, November 2, 2020

Raspberry Pi 400 is Released

 News from early this morning: 

https://youtu.be/P1E5xszQqV8

That's Christopher Barnatt from Explaining Computers who is obviously very excited to share the news. Rightly so.

I'm comparing this to Spectrum Next and its successor Spectrum Next 2, and Raspi 4 wins hands down. It's an excellent value for the money! Not to mention that it is in perfect shape to include in your bug out bag, for those of you prepping for the apocalypse. I'm holding out for an 8 GB model, since I'm an artist and we deal with RAM hungry apps all the time. The only time VM is acceptable is when doing USB boot with SSD.

http://www.jeffgeerling.com/blog/2020/im-booting-my-raspberry-pi-4-usb-ssd

Jeff Geerling has done a fantastic job detailing the process, and I'm sold! I will be seriously thinking about adding SSD to the stable.

Most people who have seen it agree that it's a nice device with cool form factor. Some people have a little bit wish for a slightly different form factor. I'm no different. Let me tell you that the fact that this exist really warms my heart. It's as close to perfection as can be.

I do wonder why they still use micro HDMI instead of regular size ones? I think there's enough space, so probably cost and manufacturing concerns. No big deal. I'm just curious. 




Sunday, November 1, 2020

Lunch Journal #6: Staple meal

 



Rice and hotdogs. Add Sriracha for taste. Eggs if I didn't eat it for breakfast. Vegetables, kimchi in this case, optional. Vitamin pills if I don't eat veggies. 

If this look simple and boring, that's correct. This is staple food that I eat every day, 6 days a week. I sometimes treat myself on Sundays. But I need staple food to get me through the week: simple, quick, and cheap.

Most people warned me about consuming hotdogs long-term, and they're right. Mystery meat pink goo and all that. But they're really cheap. Regular meat is $5 per lbs. Hotdogs are half that.

The answer is that I alternate between foods. Hotdogs and meat. Rice, ramen, and bread. Something like that. 


Monday, October 26, 2020

Kimchi Making

 


I've been experimenting with making kimchi. Basically, I use the Fermentation kit from Ball Jar. Looks like the second attempt on the left was successful. The first attempt on the right will go directly to trash! I just followed the basic recipe on the guide, substituting sriracha instead of chili powder.


Sunday, October 25, 2020

Lunch Journal#5

 



Bento Rice and Tilapia Fish

With boiled eggs and zucchini. Lemon Pepper spice sprinkled on fish, and sriracha on rice bed.

I don't eat this every day. I have been informed that Tilapia is a bad fish to eat, but they're cheap, you know?


Friday, October 23, 2020

3G Computer Specification

I was looking at old articles and one of them caught my eye: The specification for a 3M computer. If you want to know about 3M computer:

https://en.wikipedia.org/wiki/3M_computer

Basically, it has a Megahertz of CPU speed, a Megabyte of memory, and a Megapixel display. Preferably under a Megacent of price ($10,000). Somewhere down there in the Reference section, there is a funny story about how Steve Jobs tried to sell a consortium to Brown University, and the interesting thing about the story is that the 3rd M is MegaFlop.

A Flop is basically a Floating Point of Instruction. A Megaflop is basically a million of them in one second. The old Macintosh doesn't have a math co-processor, hence, no FLOP, just plain old CPU painstakingly doing the old computation the hard way.

Of course, that was before. Nowadays, I don't want a 3M computer. I want a 3G computer. What's 3G computer?

A Gigahertz CPU, a Gigabytes RAM, a Gigabit Bandwidth. 

Notice that I don't really care about screen resolution nor do I care about Flops. As far as price is concerned, it should be under $100, but if it comes in a set, it should be at $300 max.

If you know me, then you know that I carry Raspberry Pi Zero as USB Dongle to be connected to my Chromebook. Actually, it also connects to my Smartphone, via VNC, as well as to my Raspberry Pi 4, which is my "fancy" computer at home for video editing and 3D graphics.

Is Raspberry Pi Zero (Raspi Zero) a 3G computer? No. Its specifications are 700 Mhz CPU, 512 MB RAM, 480 bps (USB2) Bandwidth. The original Raspi Zero was clocked at 1 GHz, but when it comes to RaspiZeroW got down-clocked to 700 Mhz, 800 Mhz overclock. Using it via VNC robs down its capability further. RAM and Bandwidth is only half of what I wanted. So suffice to say that a Raspi Zero isn't a 3G computer, but it's actually about 1/2 of a 3G computer. To point out the things in its favor: $10 for RaspiZeroW! Cheap.

Is there a solid 3G computer? Yes. Enter Raspberry Pi 4 (Raspi 4). It has 4 cores fo 1.6 Ghz, 4 GB of RAM, and USB 3 Bandwidth. Basically, it not only fulfills 3G computer specification, it went over in all dimension by 4 fold. Price? I got mine for $55. complete kit is only $300 including monitor and memory cards. That's a good deal.

And yet, for my daily drive computing, I still use Raspi Zero. Why? Why should I use some underpowered computer? Well, I just don't need that much of computing power. Sure, I need it for 3D graphic, for which there is never enough CPU speed, but for everything else, it's enough. Mostly. 

Lately, I've been running into issues where the program needs 3GB or RAM, where even if I'm willing to wait for the program to finish, I can't because there's not enough Memory available. Raspi 4 has enough memory, so I've been running such resource hungry programs there. 

But more often than not, I'd pull the old Linux CLI, and write my own scripts from scratch, and enjoy not only a fast, lightweight program for me to use, but one that is custom-made for my workflow, as well as bug free. Why wouldn't it be? After all, if there's a bug, I'd just fix it, since the source code is *right there*!


Cray Supercomputer for $5

 Yes, it's true. You can have the equivalent of the old Cray supercomputer for only $5!

I say equivalent, not identical.

The original Cray Supercomputer cost 13.5 million dollars. That's sometime around 1985. It actually has liquid coolant mechanism. And yet, fast forward 15 years later to sometime around year 2000, and common desktop model regularly meets the same specifications, and did it without the liquid cooling part. A simple fan will do!

Now fast forward 15 years later to sometime around year 2015. The Raspberry Foundation has Model A and Model B, and it has about the same specification as the desktop model in year 2000, and therefore the same speciifications as the original Cray. The model that piqued my interest, however, is the Raspberry Pi Zero. 

I just set up the Raspi Zero model, not the ZeroW, as USB Device Dongle, thanks to Ben Hardill instructions. And it works fine. ZeroW costs $10. But the original Zero, lacking WiFi, only costs $5. Hence, a $5 Cray supercomputer.


I remember from long ago, there was an article in a computer magazine (I forget the name of the magazine) that was written by Penn Jillette. Yes, the magician. In it, he was writing about how one of his friends was bragging that he wrote a spell checker program that manages to spell check MahaBharata in 90 seconds. Somehow that story stuck with me all of these years. So, when I finally hooked up my Bugglegum computer that is Raspi Zero, I'd be interested in its performance.

As you know from previous posts, I was deep into learning how to type. I decided to write my own typing tutor program because all the other typing tutor programs out there do not allow for easy wordlist customization. Well, part of the dictionary customization is to grep some words out of the dictionary. I just happen to have 100 popular text from Project Gutenberg. To which, I simply added the Mahabharata.

The process is basically concatenating all text into one gigantic file, then reformat to one word per line, and uniquely sort it. Then I run a diff with the standard dictionary that comes with the OS. the result is the wordlist I'm looking for.

My Raspi 4 manages to filter out 100 MB text file in just 1:33 minutes. Or about the same as Cray, but with much more data involved. How about my Raspi Zero? Well, it ran out of memory. So it didn't make it.

I then split the file into manageable chunks, and those are about 15 MB file. It took Raspi Zero about 90ish seconds to process the file. Considering that that's about the size of Mahabharata, I can safely say that I have the equivalent of Cray supercomputer at the size of a bubblegum, for $5.

By the way, the processing the whole file took Raspi Zero about 10 minutes for the whole thing. Good for coffee break or something. 


Speaking of progress, I am somewhat disheartened to know that Java VM takes 495 MB in memory. Considering that RaspiZero only has 512 MB RAM, the whole thing must run on Virtual Memory, and therefore slow. But that's topic for another time.


Thursday, October 22, 2020

95 wpm


 

Yes, that's 95 words per minute. Another 5 wpm and I'll reach my goal. It has been a slog, something I do everyday. 

Since I wanted to practice mistyped words, I ended up writing a series of scripts on my Raspberry Pi which is a typing lesson scripting,  because why not? 

I'll be sharing it in the future, as my learning Linux continues. 


Sunday, October 18, 2020

Learning Linux part 2

 


That's the rest of the linux commands. Some of those is part of OS layer, instead of user layer. I suppose that's unavoidable. How many of those do you know?


Saturday, October 17, 2020

Learning Linux part 1

 


I've been relearning Linux basic commands and it turns out that it is incredibly powerful. There's a lot you can do with it, even without going into some specialized scripting language such as Perl. So, looking at that list, how many do you know?



Thursday, October 15, 2020

92 wpm

 


92 wpm today. Learning how to type does help a lot. I'm getting that much closer to my eventual goal of 100 wpm. It's true what they say. The faster you type, the less mistake you make.


Sunday, October 11, 2020

86 wpm


 Looks like I'm getting better at typing. It has been a good ride so far, and yet, I think I can go some more. There are certain words that I'm having trouble with and I think I can benefit from some custom made word list. Overall, though, I'm satisfied with the progress.

455 keystrokes means that I have the potential for 91 wpm, had I have 100% accuracy. Hopefully, that will increase to 100 wpm soon. That's my goal. after that, just work on accuracy until I get 100% every time.


Thursday, October 8, 2020

84 wpm


 I finally managed to break the top 10% on this site. I think that the site is biased toward high speed typist, though. I should have broken into top 5% already. There just aren't that many people typing more than 80 wpm. I'm guessing there's too many of these 100+ wpm typists. Not to mention that some people would cheat and use a script-bot to get 200+ wpm.

Still, I'm happy with the speed of my progress so far.


Tuesday, October 6, 2020

Ben Hardill USB device


 

I was following Ben Hardill's instruction on how to turn Raspberry Pi into USB device. This is a great benefit for me since I can then access Raspberry Pi without having to turn my phone into a hotspot. I'm using Chromebook to do it, by the way. VNC works, but slow. SSH works, but not X mode. If I want to use X mode in SSH, I have to use my Raspberry Pi 4. It works there.

I ran into a problem in writing files to root directory. I cannot access it directly, so I had to do something like "sudo nano /boot/usb" or something like that, instead of cd into /root and go from there. Another problem is that Wifi is non functional as USB device. I don't know enough to fix it. Something about sub network? 

Chromebook is good enough, though. I have VNC and SSH programs, and SSH has "Mount SFTP" option, or some other file sharing method, so I can copy files from one computer to another. I have to VNC into the Raspberry Pi first, though, and put SSH file on there. I do it with "sudo touch /boot/ssh" command. Somehow, the file get erased everytime. I probably will have to add it in startup script somewhere to make it permanent.

But it works. VNC is rather slow and jumpy. SSH works fast, though, and I prefer it for doing some heavy duty coding, although graphical projects isn't good to be done via SSH. So, thank you Ben Hardill for writing up the instruction to turn my Raspberry Pi Zero W into a USB device, suitable to turn my Samsung chromebook into a "real" computer! 


In case, you're wondering: Yes, I'm using Raspberry Pi Zero W as my daily coding computer. 


Sunday, October 4, 2020

80 wpm


 

It is rather encouraging that my typing speed went up to 80 wpm. Sure there's plenty of mistakes along the way, but considering that my masximum potential is 88 wpm without mistakes, I'd say that that's a definite improvement.

The idea, of course, is to type up to 100 wpm so that I don't have to slow down while typing what I speak. Time will tell whether or not I will achieve this by the end of the month. Normal speech speed is about 120 wpm, but I talk rather slow. 

Friday, October 2, 2020

Attempts at Journaling

 I have been journaling my life lately. I tried to do it with Bujo, or Bullet Journal. Unfortunately, it didn't work. I do seem to have come up with a workable method based on Project Management principles. 




Unfortunately, I neglected the need to migrate from one book to another. So, I was lost for a while. I tried to solve it by buying thicker journal, the brown one you see in the picture, but I realize that without proper method, it would be just delaying the problem.

As I see it, carrying one thick book is equivalent to carrying two. Therefore, I can migrate from one book to another. I just need to carry two books until the migration process is complete, then it's back to just one book.

I like Leuchtturm better than Moleskine, but I couldn't resist things that are on sale, and so bought bulk journals for cheap. Too bad, they're lined instead of dotted. But it will work well enough.

Thursday, October 1, 2020

Lunch Journal #4


 

Cheap personal pizza done quick. It's faster than delivery or frozen:

1. Grease frying pan.

2. Put tortilla in the frying pan.

3. Cook until warm. Flip.

4. Put tomato sauce, cheese, topping. 

5. Cover pan.

6. Cook until desired doneness. 

Enjoy! 


Tuesday, September 29, 2020

Typing speed 77 WPM

 


I've been training touch typing again. My last great 100% accuracy was 83 WPM. Looks like I'm out of practice. I only get 77 WPM today. Probably because the keyboard is different, too. I'm not using Apple aluminum keyboard, where I can just send pulses, instead of keypresses. Still, the mechanical keyboard that I'm using isn't that bad. 

Sunday, September 27, 2020

Lunch Journal #3 : Mold on my Bagel

 



I was just going to eat lunch, where upon taking out a bagel, I see some cobweb like thing on the bagel. Looking at it closely, I didn't see any spider. Research indicates that it is, in fact, some kind of fungi instead. Looks like some spores didn't get neutralized while in storage. The web looks like it has tiny black dots on the strands.

Obviously, this makes me throw out the whole batch. Although I only see it on one bagel, I'm not interested in finding out otherwise the hard way. This particular 6 pack comes from Safeway,  although I'm sure other shops are susceptible as well.

Research also indicates that screw top lid can be penetrated by bugs. I've been putting in bay leaf in most of my food storage,  now.


Thursday, September 24, 2020

Lunch Journal #2


Today's lunch is Rice and Beef. The rice is cooked separately with a rice cooker. The ground beef is cooked using cast iron pan. Add zucchini and egg, both pickled in the same jar. Sriracha for taste. 


 

Monday, September 7, 2020

Lunch journal 2020 #1

 




I'm blogging my cooking. This is just for me to document my attempt of eating healthy. I don't eat like this every day. In fact, left to my own devices, I usually just rice and hot dog, and nothing else. I do try to at least eat some kind of good food once a week. Usually, that happens on weekends when I have time.


I'm trying out Zojirushi Mr. Bento. This package includes the thermos, containing soup container, entree container, both thermally shielded. An extra snack container, not thermally shielded. It includes fancy carrier bag, soft and thick, as well as a spoon and chopsticks.  

The thermos itself works really well, with the food still being warm after 4 hours. The key is to put in hot water inside the soup container. Or just hot water for tea, if you don't want soup.

This lunch is rice and beef, with some sriracha added. Miso soup and grapes completes the meal. Since I eat the same thing breakfast and lunch, this saves time because I only have to cook once to eat twice.

In conclusion, a successful experiment. 


Wednesday, April 22, 2020

A simple mistake on sorting

I was watching YouTube channel the other day for CS50 by Harvard. I think the professor slipped and said something about cutting short the bubble sort if the scan did no swap. That is fine on its own. However, he also mentioned something about doing it to the selection sort as well. That is not fine. There are cases where selection sort had no swap on a scan. Come to think of it, there's a popular book that has the same error. Except in that case, it was calling selection sort, a bubble sort.

I think I can do better. Hmmm. Maybe I should!