Hyston blog
About • Archive • RSS

Quarantine purchases

June 3, 2020

⌨️ Because of unusual circumstances, regular day I spend on windows laptop before lunch and on macbook after. Both of them in clamshell mode, with closing lids and connected to same monitor, that I brought from work.
For mac I used magic keyboard for last several years, but my hands refuse to type on apple keyboard in windows. Even after I remapped in win10 using SharpKey ⌘ key to ctrl, and ⌥ to alt, it feels clumsy and inappropriate. So I started looking for new keyboard. My requirements were simple:

I haven't found many options. Actually, Keychron K1 was the only one that met every criteria. I'm sure, that there are more, but thats the one that I get and I'm happy about it. And I kinda get all this buzz about mechanical keyboards, it is really nice feel to type on, even on such small profile. I even thought about connecting it to the mac, but for me this is already a windows keyboard. It has switch mac/win, but I just cant press "⌥ + Q" on keyboard, where are used to press "alt + F4" and vice versa.
There are some minor throwbacks, too. Rgb lights are uneven and gimmicky (by my opinion). Keyboard has a dosen types of keys light, but I have found only two of them useful and not distracting. Sometimes key switches (I used red) are too sensible and key started being detected even if I just lay hand on keyboard.
keychron
🎧
My other purchase was motivated by my son. After he dropped my beloved Bose QC25, their right ear speaker stopped working. I always said, that this was the best purchase in my professional career – these headphones helped me survive in noisy offices for several years. Even I'm not in office anymore, I simply cannot concentrate on code without closed headphones on my head, ideally, with noise cancellation. After a week without headphones at home, I got sick from kids cries with TV in next room and ordered Bose 700 (they have full name, but I don't care). And this is the best thing, that I have done to improve my productivity during quarantine. When I wear them, I block myself from other world and concentrate on my tasks. I'm not impressed by sound quality (even QC25, AirPods and cheap JBL plugs sound better, by my opinion), but bose 700 are the most comfortable and block completely surrounding sounds. When I turn them off, I have a feeling, that I'm on plane, that is taking off - suddenly I hear roaring ventilators from both laptops. And it is possible to connect these headphones to two devices, usually for me they are connected to iPhone and XPS15. There are one issue, related to that: if one device start playing sound (doesn't matter, which one), the another device became muted (without pausing playback). As example, when I listen to video or music on laptop and quickly check phone, then sound of locking phone mute sound on laptop until I'll click stop/play again. Minor issue, but annoying. With pair iPhone/mac volume is also muted, but audio switches back very quickly. bose700

Last purchase, that made home life considerably nicer - JBL Flip 5. Now I can listen relaxing jazz with my family or some cheerful hip-hop/rock while cooking. 🎸


Blog update

May 22, 2020

I finally added info about myself and rss feed!


Visual Studio Codespaces

May 21, 2020

MsBuild 2020 is happening right now and I'm trying to catch and learn many interesting stuff from there. By now, the most exciting part was Visual Studio Codespaces, previously known as VS Online. I have already tried it about half a year ago and, as I remember, then it allowed only to create host machine in the cloud. But now it is possible to create free self-hosted environment and, basically, connect from anywhere to development machine. Well, there are some asterisks.
As usually, there are some good guidance on docs.microsoft, here is a good place to start. For cloud environment process is relatively trivial: create microsoft account, create azure account (at this step you need to add credit card credentials), open Visual Studio Online and create host. Of course, it take a lot of time between page redirection and entering account credentials. In Safari this page stuck in endless authorization loop, firefox also refused it to open, use Chrome. Then in desktop VS Code install "Remote Explorer" extension and (also after endless login in microsoft, azure and github account) it is possible to connect into cloud machine and use it as local. Well, almost. Here is list of things, that I have tried, but didn't work well:

visual studio codespace on ipad

BUT This is actual, real and powerful IDE, running in browser! And I didn't use Edge browser1, hopefully Safari support will come soon. On one of questions in VS codespaces Q&A videos, host called iPad support as one of their nearest priorities. That would be awesome🤩


  1. it will take a while until I will start trust to MS browser. I'm old enough to remember supporting IE6.


ELK

May 13, 2020

I was working on adding logs into elastic search from one of our micro API projects. I learned a little bit, that I'll probably forget when I'll deal with this next time. So, I'll write it here.

  1. ELK - Elastic Stack. How it works:
  1. It's very useful to run ELK Stack local. Of course, installing everything will take too much time (I still remember painy days spent installing lamp). Of course, these days everything is in container and there is one good repository, that will help running everything in minutes. All you need to do is:
git clone https://github.com/deviantony/docker-elk.git
cd .\docker-elk\
docker-compose up

And read ReadMe.md for further details.

  1. In my case, we have configured sentry and adding additional logging system, without removing old one. In this case better to remove "Logging" section in appsettings, otherwise it will affect both system. Most tutorials recommend start logging in Program.cs before actual werver will start, but I find it too cumbersome. If server didn't started, we will figure it out by not seing swagger page or by errors from other service, that consume this api.
  2. Also, most tutopials did not mention, that serilog can be configured not in code, but in appsettings. Probably, additional libraries needs to be installed, but then startup code itself is not polutted with config lines.
  3. When kibana resist to show logs, it means that, probably, indecies were not setted up correctly. And keep in mind, that it takes some time for log to appear, even if everything is running locally.
  4. Some usefull links:

This is probably too much info for such easy topic, but I might find it usefull some day later and - hey - I'm blogging again!😊


Biteshift

January 11, 2020

I started to participate in Advent of code 2020. First couple tasks were easy, but after a while it keep getting harder and took more time, that I can manage on average december day. Today is 8 day and I done only 14 of them and want to share one bug, that I did found solving last one. I am pretty familiar with bitwise operators, espacially shift:

1 << 1; //result it 2 (bin: 10)
1 << 3; //result it 8 (bin: 1000)

However, in day 14 bitmask is 36 bit length. If you shift too much, it should be cut. Alright, I thought, lets use unsined 64-bit integers.
ulong a = 1 << 32;
Because currently I dont have a debugger1, and it worked flawlessly with smaller values, I havent noticed an error here. Documentation said

Because the shift operators are defined only for the int, uint, long, and ulong types, the result of an operation always contains at least 32 bits and I naturally assumed, that if I define left hand operand as 64bit, then result would be also 64. That was correct, but before it


  1. VS Code support for M1 macs is incomplete, as I'm afraid, until .net 6 😣


← Next Previous →