24. Feb 2021 |

I always forget to turn Toggle off

And it is so annoying.

This is overview of my last week’s coding activity. My own projects, escapades and experiments are not included. School only.

On the right is my last week in Focusmeter app. Blue area is time spent doing Distributed Systems, yellow is JavaScript. On the left is my effort to use Toggl and Focusmeter together (using split screen) so that I would not forget to turn Toggl off.

I would really like to use Toggl for time tracking as a part of my workflow but I always forget it running. Also my productivity is so much better with (which ever) pomodoro timer that arranges my time into logical work and break units. But the problem with pomodoro is that pomodoro is not for tracking but just time management. So at the moment there is no good solution for me 🙂

Update

It looks better with Goodtime app for pomodoro functionalities.

By using Samsung split screen I can run 2 apps at the same time. Above is Goodtime pomodoro app and below I have Toggl. It was a good discovery for me that for project whole pink box is actually clickable for starting (no need to tap the small play button).

19. Feb 2021 |

Using SSH with Atom ftp-remote-edit

It also works similarly in Filezilla. If you have questions, please leave comments 🙂

Atom ftp-remote-edit started to break my files occasionally due to the issue that this Atom package uses ftp in passive mode by default which tries to open too many ports at once. For example if I had large css file then it uploaded only half of it and gave me following 451 and timeout errors:

  • 451-Error during read from data connection 451 Transfer aborted
  • Timeout (control socket)
Atom errors

Suggestion from my webhosting provider was to use SSH instead of FTP but configuring it is kind of difficult for the first time. So here it is:

Atom SSH config
  • Hostname is your hostname
  • username is your username (username@hostname.ee)
  • If you have not configured password then you can just leave it empty.
  • key is private key (not *.pub (public) but the other file) – I wasted some time here.
  • Initial directory path I got from my webhosting service provider. Without the path to initial directory you will probably get to the root from where it is not possible to navigate anywhere.

I think most difficult in Windows was to find the private key file (and initially to create one). But there are enough tutorials available on how to generate SSH keys. My own notes (which I use quite often) are here.

In Ubuntu the key file is located in …

What I use it for

I have gotten used to using Atom for small edits that need to be done here and there. For example my school dashboard – if I need to add something there then I open the folder in Atom ftp-remote-edit, do the edits, ctrl+s and it is live without having any files in my computer.

Also, when I need to work with data in Excel and need to upload it as csv file to the server then instead of saving csv on my computer I do textjoin in excel and copy-paste the content to csv file on server through ftp-remote-edit.

11. Feb 2021 |

Bitwarden browser autofill shortcut not working (solution)

I switched from 1Password password manager to Bitwarden about year ago. Simply because Bitwarden is free while the cost of 1Password was 72 dollars per year (Family version).

Recently browser autofill shortcut stopped working. Today I figured out how to get it work again.

On Chrome open chrome://extensions/shortcuts on your browser and fill the shortcut yourself.

Edge

If you use Edge browser then open edge://extensions/shortcuts and fill the shortcut yourself.

Firefox

If you use Firefox then go to about:addons → Extensions → from the settings icon you can get to manage extension shortcuts.

It is very convenient to autofill logins with ctrl + shift + L. If you have multiple accounts on some webservices (for example you have several Twitter accounts) then you can rotate between these by repeating the shortcut.

9. Feb 2021 |

Notes for myself: Videos of lectures – how I watch

On fridays I have up to 9 hours of lecture videos to watch. It is split into 3 x 3h videos. Each “video” on Echo360 is actually 3 files: audio file, video of computer screen (presentation) and view from camera to blackboard.

I download screen and audio files from Echo. In order to get video with audio as one file I join them with:

ffmpeg -i video.m4s -i audio.m4s -c:v copy -c:a aac output.mp4

As 3 videos per every friday over 16 weeks would make 48 videos I try to join videos of every week by using:

ffmpeg -f concat -safe 0 -i list.txt -c copy output.mp4

So I have 16 videos on my Youtube for these subjects. List.txt is list of files structured like:

file '00-video.mp4'
file '01-video.mp4'

In order to skim through the video first I use opportunity to speed up the video. I mark down important parts and the work through the material.

Trim 

ffmpeg -ss 00:01:00 -i input.mp4 -to 00:02:00 -c copy output.mp4
8. Feb 2021 |

Youtube videos faster than 2x

Just use this javascript in brownser console (open with F12 and choose console). You can replace this 2.75 in the end with what you want. I use it to watch 3h of lecture in one hour because estonians simply talk slowly 🙂

document.querySelectorAll('video').forEach(v => v.playbackRate = 2.75)

For convenient use you can save it as a bookmark and it should change the speed of the video:

javascript:document.querySelectorAll('video').forEach(v => v.playbackRate = 2.75)

3. Feb 2021 |

Kuidas saab miski olla nii odav (VPS)

Selleks, et mul oleks hajussüsteemide aines oma dev andmebaas… OK, alustame sellest, et mul ei olnud esialgu ettekujutust, et mis on Docker ja kuidas VPSi kasutamine käib. Võtsin mõne päeva sellest nädalast, mis eksamite ja uue semestri vahele jäi ning natuke uurisin.

Nüüd ma olen seal kohas, et mul on Hetzneris see kõige odavam VPS (1 vCPU, 2 GB RAM, Helsinki), kus jookseb tavaline Ubuntu Server, kuhu olen installinud Dockeri ja selles jookseb MS SQL server. Seni identne selle barreli omaga, mis Käveril. Ma ei ole selle eest mitte midagi maksnud, sest lihtne Google otsing andis 24 eurose kupongi veebruari lõpuni 🙂 Aga, see maksaks muidu 2.96 eurot (koos maksudega!). Nagu, misasi see on!? Kuidas see saab nii odav olla 😀

Kui Hetzneri kupongi poleks leidnud, siis ilmselt oleks õppimiseks kasutanud siit artikli lõpust UpCloudi või DigitalOceani kupongi.

26. Jan 2021 |

100 Days of Code (in second post)

Made second post. Grouping by 25 days should be good.

  1. (25.01) 3h 48min. I see that I have spent 19 mins of Docker (though I belive I spent more time on it to learn using MariaDB and phpmyadmin in Linux VM) and the rest is C#.
  2. 4h 38min. C# (database connection etc), Distributed Systems (DS) intro.
    School has begun and my Gitlab grid looks more impressive that ever before. It looks like it should have looked last semester (though I belive my Bitbucket dashboard would have looked good too if only would they have it).
  3. (27.01) 2:50 JS, 0:48 JS.
  4. (28.01) 48 mins of JS, 2h 25 mins of Distributed Systems. Had two lectures to attend.
  5. (29.01) Friday. Had 6h of lectures to attend (DS and JS). 4:01.
  6. (30.01) For .NET things moved over to Win10. Got really tired of solving Linux issues that only I happen to have.
    2h 52 mins of tracked C#, Razor Pages. The rest spend on setting up WSL2 on Win10, updating and setting up everything on Win10 side. So far it has been 22 h 38 mins of coding this week.
  7. (31.01) 4h 6 mins of DS and JS. Sunday. It got me 27 hours of coding this week + few hours of setting up/debugging environment, server etc. Looks like a good week. My Gitlab grid looks like this 🙂 You can also compare it to previous semester.

    Don’t get me wrong. I used Github (for my own stuff) and Bitbucket (for 2 subjects at school). But my school Gitlab account could have been more active too.
  8.  (01.02) New month. 4h 19mins of coding. DS and JS. Started with small Aurelia “Hello world” project and installing it. I really don’t like the name Aurelia and their color scheme is straight from TalTech brand 😀 React, Vue and Angular are much better names. Spent once again so much time setting things up on my computer. Tried to undestand why docker-composer was in snap folder (no documentation mentions such option), why same repo in WSL terminal git has different status than in Windows Terminal etc. But at the moment everything seems to sort of work.
  9. 4h 46min, 2:54 JS, 1:41 DS
  10. 4h 4min Distributed Systems
  11. – will write later ( travelled to Tartu)
  12. (05.02) 3h 12mins heavy C# friday. Working on my own project. Really like this inheritance and interface game.
  13. (06.02) Built my own API on top of Noom API. Looking forward to next week whey I will probably get access to the new API we ordered from them and can get more data for my stores.

 

Other stuff

15. Jan 2021 |

n/100 – 100 Days of Code (in one post)

Writing daily posts is getting challenge on its own. Therefore I will continue as one post.

  1. (13.01) Started to revise C# lectures with an aim to finalize .NET app. Starting from console menu task to fully understand everything.
    Also downloaded Heino Talvik’s “Containers and Microservices” from Echo360 and Moodle so that I could study it on my own (before it gets back into program in autumn).
  2. (14.01) Got stuck into refactoring this app from mysqli to pdo and bring duplication check from db level to memory.
  3. (15.01) In the morning I continued work with blog-aggregator project to get it from mysqli to pdo and front-controller model using Twig. Also update to the latest Bootstrap.
    Most of the day learnt how to use VPS for the first time (by using Hetzner‘s 24 euros offer I found here). Managed to set up my first MariaDB server as Docker instance and access it from phpStorm. It must be the cheapest entertainment because I still have €23.97 remaining credits 😀
  4. According to Goodtime and Toggl I did C# for 2 hours. Trying to understand Delegates.
  5. 1h 15mins of C#. Way too little (3 rounds of Pomodoro).
  6. 1h 20min of C#. Still trying to understand every character I am writing.
  7. (19.01) 1h of C#.
  8. (20.01) The day of Joe Biden’s inauguration 🙂 4h 25min C#. Trying to get out of the Menu but I don’t get it where I make mistake. I will ask the teacher tomorrow. I got it solved before going to bed. The issue was that return is used only when exiting. And I had to assign the value to the variable that was returned. Looked littlebit recursion-like thing for me.
  9. 2h 16min of C#. Got my TicTacToe to run in memory and update the board. Tomorrow I would like get to the end of this lesson.
  10. 1h 55min of C#. I also finalized my Youtube channel containing all 44 videos from Building Distributed Systems (2020, ICD0009). I downloaded 18GB of files from Echo360, glued audio and video together and uploaded 17GB of video to Youtube.
  11. (23.01) 2h 8 min of  C# + 25 min of JavaScript.
  12. (24.01) 1h 59 min of C#. Getting to the point where I sort of understand the 2 first homeworks of previous semester’s C# it has taken me (to this point) one week with 18h 20min of work (tracking with Focusmeter app and then adding to my Toggl account).
    My teacher said in the lecture that he has coded estimated around 40-50k hours in his life. He also said that there is no talent in coding. 99% of the result is practice (hours put into writing the code).

In progress.

Continue reading “n/100 – 100 Days of Code (in one post)”

13. Jan 2021 |

Koolis käimine ja keskkond

Selle artikli mõjul tekkis mõte vaadata, missugune on olnud umbes 10 aasta jooksul muutus keskkonnajäljes, mida õpingud tekitavad.

Tartu Ülikoolis (2007-2012) käies oli tunne, et ülikool on üks suur PowerPoint, kuna see oli peamine õppematerjali formaat. Väljaprinditud slaidid käsikirjaliste märkmete ja kommentaaridega. Lisaks õpikud. Nendega sahistasin efektiivselt TÜ raamatukogus. Ühtegi energiatarbijat ei olnud. Arvutiga töötamine toimus kodus suure arvutiga ja seisnes peamiselt konspekti trükkimises.

Sülearvutit ei olnud mitte kellelgi. Alles 5. kursusel ilmusid esimesed sülearvutid (1-2, mitte rohkem) auditooriumisse. Ka nutitelefone ei olnud kellelgi (enda esimese sain 5. kursusel – Sony Xperia Neo). Seega tähelepanu hajumisega oli muret palju vähem kui praegu. Alguses ei olnud Facebooki ka 🙂

Koolis käisin kõik 5 aastat jalgrattaga – 3 km kooli ja sama palju tagasi. Ainult kõige suurema lumega, kui üldse sõita ei saanud, käisin bussiga aga need olid mõned üksikud korrad.

Loeksin selle koolis käimise keskkonnajälje väga minimaalseks.

EBSis (2016-2019) käies tekitasin tõenäoliselt kõige suurema jalajälje autoga (Subary Legacy, nelivedu, 110kW, 1994 cm3). Nimelt, kuna kool algas kell 18 (kui õigesti mäletan) ja kool asus Tallinna südalinnas, siis pidin kuni 4x nädalas sukelduma tipptunni-liiklusesse 🙂 Kusjuures, teepikkus kontorist kooli oli samuti 3 km nagu TÜ aegadel.

Suurt slaidide printimist ei mäleta aga midagi ilmselt sai trükitud. Osades ainetes oli oluline käsikirjaline konspekt (nt mikroökonoomika), sülearvutis konspekteerimist oli küll. Kui autot mitte arvestada, siis keskkonnajälg TÜga üsna sarnane.

TalTechis on kogu õppe keskkonnajälg varasemaga maksimaalne. Ilma arvutita inimest auditooriumis naljalt ei ole. Paljud loengud on videona ka olemas (mis on väga tore) ja videost on kujunenud peamine õppematerjal, mis omakorda on küllalt ajakulukas formaat. Konspekt või õpik* oleks ehk palju kiiremini tarbitav 🙂 Aga kuna Echo360 keskkond on ebamugav vaadata, siis olen kõik videod endale omakorda Youtube’i ümber tõstnud. See tähendab, et andmeid on nüüd veel mitu korda rohkem, mida serverid peavad hoidma ja serveerima. Kui kõik tundengid sama teevad, siis tuleb sellest päris õudus kokku.

Ma olen gigabaitide viisi videosid striiminud, alla laadinud, kokku liiminud, üles laadinud ja uuesti striiminud. Ma arvan, et see keskkonnajälg on üsna suur 😀 Sorry.